aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/InlineCost.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-18 18:49:04 +0000
committerChris Lattner <sabre@nondot.org>2009-07-18 18:49:04 +0000
commit93f2491cf832e3f4530fab8ce1755c2b501346ae (patch)
tree5758087d56de10d89ba84af46568df05404cf9b1 /lib/Transforms/Utils/InlineCost.cpp
parentfc2271f3f5cf25a739f625ba7dfc6d618d26db7b (diff)
add a fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76324 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/InlineCost.cpp')
-rw-r--r--lib/Transforms/Utils/InlineCost.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/InlineCost.cpp b/lib/Transforms/Utils/InlineCost.cpp
index 5fe85e6ef2..8925a752b1 100644
--- a/lib/Transforms/Utils/InlineCost.cpp
+++ b/lib/Transforms/Utils/InlineCost.cpp
@@ -45,6 +45,11 @@ unsigned InlineCostAnalyzer::FunctionInfo::
// 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;