[llvm-commits] [llvm] r46553 - /llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
Nick Lewycky
nicholas at mxc.ca
Tue Jan 29 23:45:37 PST 2008
Author: nicholas
Date: Wed Jan 30 01:45:37 2008
New Revision: 46553
URL: http://llvm.org/viewvc/llvm-project?rev=46553&view=rev
Log:
Don't DCE FreeInst's. We were using those! Patch from Owen Anderson.
Modified:
llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp?rev=46553&r1=46552&r2=46553&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Wed Jan 30 01:45:37 2008
@@ -420,7 +420,7 @@
} else {
// For any non-memory-affecting non-terminators, DCE them as we reach them
Instruction *CI = BBI;
- if (!CI->isTerminator() && CI->getNumUses() == 0) {
+ if (!CI->isTerminator() && CI->getNumUses() == 0 && !isa<FreeInst>(CI)) {
// DCE instructions only used to calculate that load
for (Instruction::op_iterator OI = CI->op_begin(), OE = CI->op_end();
More information about the llvm-commits
mailing list