summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-04-28 20:02:57 +0000
committerChris Lattner <sabre@nondot.org>2011-04-28 20:02:57 +0000
commita5452c0d67e33d4f6578329d4995840853cb28f5 (patch)
treec1d346bfe95819fa8485604410a5f1823ecd0757 /llvm/lib
parent18470e32870a408960345419df788675edcd7b77 (diff)
downloadbcm5719-llvm-a5452c0d67e33d4f6578329d4995840853cb28f5.tar.gz
bcm5719-llvm-a5452c0d67e33d4f6578329d4995840853cb28f5.zip
improve comment.
llvm-svn: 130426
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/GVN.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index abd76898cd3..efecb97de77 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -969,8 +969,13 @@ static Value *GetLoadValueForLoad(LoadInst *SrcVal, unsigned Offset,
NewLoadSize*8-SrcVal->getType()->getPrimitiveSizeInBits());
RV = Builder.CreateTrunc(RV, SrcVal->getType());
SrcVal->replaceAllUsesWith(RV);
+
+ // We would like to use gvn.markInstructionForDeletion here, but we can't
+ // because the load is already memoized into the leader map table that GVN
+ // tracks. It is potentially possible to remove the load from the table,
+ // but then there all of the operations based on it would need to be
+ // rehashed. Just leave the dead load around.
gvn.getMemDep().removeInstruction(SrcVal);
- //gvn.markInstructionForDeletion(SrcVal);
SrcVal = NewLoad;
}
OpenPOWER on IntegriCloud