aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/MachineLICM.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-10-20 17:31:18 +0000
committerDevang Patel <dpatel@apple.com>2011-10-20 17:31:18 +0000
commite6de9f30cbdbeca7f6632420f2cd5728d9a2dc1c (patch)
tree6d679901e2830e7b13f94e4b5acafbd9f381f43f /lib/CodeGen/MachineLICM.cpp
parent01817c39a9d7ff864d0b5de4941eec93d2f9e3a8 (diff)
downloadexternal_llvm-e6de9f30cbdbeca7f6632420f2cd5728d9a2dc1c.zip
external_llvm-e6de9f30cbdbeca7f6632420f2cd5728d9a2dc1c.tar.gz
external_llvm-e6de9f30cbdbeca7f6632420f2cd5728d9a2dc1c.tar.bz2
Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineLICM.cpp')
-rw-r--r--lib/CodeGen/MachineLICM.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp
index 969a9b0..c693386 100644
--- a/lib/CodeGen/MachineLICM.cpp
+++ b/lib/CodeGen/MachineLICM.cpp
@@ -788,7 +788,9 @@ bool MachineLICM::IsLICMCandidate(MachineInstr &I) {
// If it is load then check if it is guaranteed to execute by making sure that
// it dominates all exiting blocks. If it doesn't, then there is a path out of
- // the loop which does not execute this load, so we can't hoist it.
+ // the loop which does not execute this load, so we can't hoist it. Loads
+ // from constant memory are not safe to speculate all the time, for example
+ // indexed load from a jump table.
// Stores and side effects are already checked by isSafeToMove.
if (I.getDesc().mayLoad() && !isLoadFromGOT(I) &&
!IsGuaranteedToExecute(I.getParent()))