[llvm-commits] [llvm] r142592 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp

Devang Patel dpatel at apple.com
Thu Oct 20 10:31:18 PDT 2011


Author: dpatel
Date: Thu Oct 20 12:31:18 2011
New Revision: 142592

URL: http://llvm.org/viewvc/llvm-project?rev=142592&view=rev
Log:
Add a comment.

Modified:
    llvm/trunk/lib/CodeGen/MachineLICM.cpp

Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=142592&r1=142591&r2=142592&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Thu Oct 20 12:31:18 2011
@@ -788,7 +788,9 @@
 
   // 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()))





More information about the llvm-commits mailing list