From: Chris Lattner Date: Tue, 27 Sep 2005 21:33:12 +0000 (+0000) Subject: Avoid spilling stack slots... to stack slots. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4531371960f3a36790c34c4fd85838907ff65a9c;p=oota-llvm.git Avoid spilling stack slots... to stack slots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23478 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 54724b5f1ac..0f664e151f9 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -334,6 +334,12 @@ splitLiveRangesLiveAcrossInvokes(std::vector &Invokes) { cast(Inst->use_back())->getParent() == BB && !isa(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(Inst)) + if (isa(AI->getArraySize()) && BB == F->begin()) + continue; + // Avoid iterator invalidation by copying users to a temporary vector. std::vector Users; for (Value::use_iterator UI = Inst->use_begin(), E = Inst->use_end();