summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LowerInvoke.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-27 21:33:12 +0000
committerChris Lattner <sabre@nondot.org>2005-09-27 21:33:12 +0000
commite285f5ed8f15de7be2c2000d8ee464d36c788b1d (patch)
tree441d4262e4f2740be11280d296fad8a64ca2e745 /llvm/lib/Transforms/Scalar/LowerInvoke.cpp
parent87eb24930006dbe32ef9159d58834a7a00121543 (diff)
downloadbcm5719-llvm-e285f5ed8f15de7be2c2000d8ee464d36c788b1d.tar.gz
bcm5719-llvm-e285f5ed8f15de7be2c2000d8ee464d36c788b1d.zip
Avoid spilling stack slots... to stack slots.
llvm-svn: 23478
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LowerInvoke.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LowerInvoke.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LowerInvoke.cpp b/llvm/lib/Transforms/Scalar/LowerInvoke.cpp
index 54724b5f1ac..0f664e151f9 100644
--- a/llvm/lib/Transforms/Scalar/LowerInvoke.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerInvoke.cpp
@@ -334,6 +334,12 @@ splitLiveRangesLiveAcrossInvokes(std::vector<InvokeInst*> &Invokes) {
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();
OpenPOWER on IntegriCloud