aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms/Utils/Local.h
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-01-29 19:19:08 +0000
committerBob Wilson <bob.wilson@apple.com>2010-01-29 19:19:08 +0000
commit3eb4f7e2dd98038f94e45d1c45ccff49e6659c87 (patch)
tree9ad9e9d474fae169ffb5303be1b8ff1336e6704e /include/llvm/Transforms/Utils/Local.h
parent01eba397936941f35dfb0995beace7ed03b847f2 (diff)
downloadexternal_llvm-3eb4f7e2dd98038f94e45d1c45ccff49e6659c87.zip
external_llvm-3eb4f7e2dd98038f94e45d1c45ccff49e6659c87.tar.gz
external_llvm-3eb4f7e2dd98038f94e45d1c45ccff49e6659c87.tar.bz2
Improve isSafeToLoadUnconditionally to recognize that GEPs with constant
indices are safe if the result is known to be within the bounds of the underlying object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils/Local.h')
-rw-r--r--include/llvm/Transforms/Utils/Local.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h
index f6d9f82..3211518 100644
--- a/include/llvm/Transforms/Utils/Local.h
+++ b/include/llvm/Transforms/Utils/Local.h
@@ -38,7 +38,8 @@ template<typename T> class SmallVectorImpl;
/// from this value cannot trap. If it is not obviously safe to load from the
/// specified pointer, we do a quick local scan of the basic block containing
/// ScanFrom, to determine if the address is already accessed.
-bool isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom);
+bool isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom,
+ const TargetData *TD = 0);
//===----------------------------------------------------------------------===//
// Local constant propagation.