aboutsummaryrefslogtreecommitdiffstats
path: root/include
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
commitb23d5adbc8230167e711070b9298985de4580f30 (patch)
tree271363ac8e0893d0dea7fbf4adb02d37e329ac17 /include
parentcdbada613e84bdf9e9c67bb683fc77a60d77cf99 (diff)
downloadexternal_llvm-b23d5adbc8230167e711070b9298985de4580f30.zip
external_llvm-b23d5adbc8230167e711070b9298985de4580f30.tar.gz
external_llvm-b23d5adbc8230167e711070b9298985de4580f30.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')
-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