diff options
author | Chris Lattner <sabre@nondot.org> | 2005-09-27 21:33:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-09-27 21:33:12 +0000 |
commit | 4531371960f3a36790c34c4fd85838907ff65a9c (patch) | |
tree | d12430c0b4e8e0bdc926c891d06898de6fb98a43 /lib/Transforms/Utils | |
parent | f4e6c3a69b3cf3a381811900c0f3768f626e90b8 (diff) | |
download | external_llvm-4531371960f3a36790c34c4fd85838907ff65a9c.zip external_llvm-4531371960f3a36790c34c4fd85838907ff65a9c.tar.gz external_llvm-4531371960f3a36790c34c4fd85838907ff65a9c.tar.bz2 |
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')
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 54724b5..0f664e1 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(); |