aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/ValueTracking.h
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2008-06-16 12:48:21 +0000
committerMatthijs Kooijman <matthijs@stdin.nl>2008-06-16 12:48:21 +0000
commite8cf6f82133375bd5a596d3897fb9b8794a4974f (patch)
tree271363ac8e0893d0dea7fbf4adb02d37e329ac17 /include/llvm/Analysis/ValueTracking.h
parent42c8f3999ccb4a9907cc1c3afb749af8af995e65 (diff)
downloadexternal_llvm-e8cf6f82133375bd5a596d3897fb9b8794a4974f.zip
external_llvm-e8cf6f82133375bd5a596d3897fb9b8794a4974f.tar.gz
external_llvm-e8cf6f82133375bd5a596d3897fb9b8794a4974f.tar.bz2
Move FindScalarValue from InstructionCombining.cpp to ValueTracking.cpp. While
I'm at it, rename it to FindInsertedValue. The only functional change is that newly created instructions are no longer added to instcombine's worklist, but that is not really necessary anyway (and I'll commit some improvements next that will completely remove the need). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52315 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ValueTracking.h')
-rw-r--r--include/llvm/Analysis/ValueTracking.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h
index ca8d3e3..df59c70 100644
--- a/include/llvm/Analysis/ValueTracking.h
+++ b/include/llvm/Analysis/ValueTracking.h
@@ -17,6 +17,7 @@
namespace llvm {
class Value;
+ class Instruction;
class APInt;
class TargetData;
@@ -50,6 +51,14 @@ namespace llvm {
/// value is never equal to -0.0.
///
bool CannotBeNegativeZero(const Value *V, unsigned Depth = 0);
+
+ /// FindScalarValue - Given an aggregrate and an sequence of indices, see if the
+ /// scalar value indexed is already around as a register, for example if it were
+ /// inserted directly into the aggregrate.
+ Value *FindInsertedValue(Value *V,
+ const unsigned *idx_begin,
+ const unsigned *idx_end,
+ Instruction &InsertBefore);
} // end namespace llvm
#endif