[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LowerInvoke.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Sep 27 14:33:23 PDT 2005
Changes in directory llvm/lib/Transforms/Scalar:
LowerInvoke.cpp updated: 1.29 -> 1.30
---
Log message:
Avoid spilling stack slots... to stack slots.
---
Diffs of the changes: (+6 -0)
LowerInvoke.cpp | 6 ++++++
1 files changed, 6 insertions(+)
Index: llvm/lib/Transforms/Scalar/LowerInvoke.cpp
diff -u llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.29 llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.30
--- llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.29 Tue Sep 27 16:18:17 2005
+++ llvm/lib/Transforms/Scalar/LowerInvoke.cpp Tue Sep 27 16:33:12 2005
@@ -334,6 +334,12 @@
cast<Instruction>(Inst->use_back())->getParent() == BB &&
!isa<PHINode>(Inst->use_back())) continue;
+ // If this is an alloca in the entry block, it's not a real register
+ // value.
+ if (AllocaInst *AI = dyn_cast<AllocaInst>(Inst))
+ if (isa<ConstantInt>(AI->getArraySize()) && BB == F->begin())
+ continue;
+
// Avoid iterator invalidation by copying users to a temporary vector.
std::vector<Instruction*> Users;
for (Value::use_iterator UI = Inst->use_begin(), E = Inst->use_end();
More information about the llvm-commits
mailing list