summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/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
commit4531371960f3a36790c34c4fd85838907ff65a9c (patch)
treed12430c0b4e8e0bdc926c891d06898de6fb98a43 /lib/Transforms/Utils/LowerInvoke.cpp
parentf4e6c3a69b3cf3a381811900c0f3768f626e90b8 (diff)
downloadllvm-4531371960f3a36790c34c4fd85838907ff65a9c.tar.gz
llvm-4531371960f3a36790c34c4fd85838907ff65a9c.tar.bz2
llvm-4531371960f3a36790c34c4fd85838907ff65a9c.tar.xz
Avoid spilling stack slots... to stack slots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp
index 54724b5f1a..0f664e151f 100644
--- a/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/lib/Transforms/Utils/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();