[llvm-commits] [llvm] r76324 - /llvm/trunk/lib/Transforms/Utils/InlineCost.cpp

Chris Lattner sabre at nondot.org
Sat Jul 18 11:49:15 PDT 2009


Author: lattner
Date: Sat Jul 18 13:49:04 2009
New Revision: 76324

URL: http://llvm.org/viewvc/llvm-project?rev=76324&view=rev
Log:
add a fixme

Modified:
    llvm/trunk/lib/Transforms/Utils/InlineCost.cpp

Modified: llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineCost.cpp?rev=76324&r1=76323&r2=76324&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InlineCost.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Sat Jul 18 13:49:04 2009
@@ -45,6 +45,11 @@
       
       // We can't constant propagate instructions which have effects or
       // read memory.
+      //
+      // FIXME: It would be nice to capture the fact that a load from a
+      // pointer-to-constant-global is actually a *really* good thing to zap.
+      // Unfortunately, we don't know the pointer that may get propagated here,
+      // so we can't make this decision.
       if (Inst.mayReadFromMemory() || Inst.mayHaveSideEffects() ||
           isa<AllocationInst>(Inst))
         continue;





More information about the llvm-commits mailing list