summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/ValueTracking.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-30 22:25:26 +0000
committerChris Lattner <sabre@nondot.org>2010-11-30 22:25:26 +0000
commited58a6f96f605901adc0df3ca76499d52b2d1a1a (patch)
tree5ad50250767689ce2ad6237ed325d16c52725600 /include/llvm/Analysis/ValueTracking.h
parentfcf8d7c73d7517e26f9f9d1a9af22ad4314e4984 (diff)
downloadllvm-ed58a6f96f605901adc0df3ca76499d52b2d1a1a.tar.gz
llvm-ed58a6f96f605901adc0df3ca76499d52b2d1a1a.tar.bz2
llvm-ed58a6f96f605901adc0df3ca76499d52b2d1a1a.tar.xz
move GetPointerBaseWithConstantOffset out of GVN into ValueTracking.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120476 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ValueTracking.h')
-rw-r--r--include/llvm/Analysis/ValueTracking.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h
index f7dcde8f4f..b95749f5ed 100644
--- a/include/llvm/Analysis/ValueTracking.h
+++ b/include/llvm/Analysis/ValueTracking.h
@@ -97,6 +97,12 @@ namespace llvm {
return FindInsertedValue(V, &Idxs[0], &Idxs[1], InsertBefore);
}
+ /// GetPointerBaseWithConstantOffset - Analyze the specified pointer to see if
+ /// it can be expressed as a base pointer plus a constant offset. Return the
+ /// base and offset to the caller.
+ Value *GetPointerBaseWithConstantOffset(Value *Ptr, int64_t &Offset,
+ const TargetData &TD);
+
/// GetConstantStringInfo - This function computes the length of a
/// null-terminated C string pointed to by V. If successful, it returns true
/// and returns the string in Str. If unsuccessful, it returns false. If