diff options
author | Dan Gohman <gohman@apple.com> | 2010-07-07 23:52:58 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-07-07 23:52:58 +0000 |
commit | 49dcb0f9ec865fd5474e5b552723adab2d7bf840 (patch) | |
tree | e2f12764df5e91ba918a4673debd7a2741663f02 /lib/CodeGen | |
parent | 61b7cea126a0178045839093c98f7a75b6620b72 (diff) | |
download | external_llvm-49dcb0f9ec865fd5474e5b552723adab2d7bf840.tar.gz external_llvm-49dcb0f9ec865fd5474e5b552723adab2d7bf840.tar.bz2 external_llvm-49dcb0f9ec865fd5474e5b552723adab2d7bf840.zip |
Don't forward-declare registers for static allocas, which we'll
prefer to materialize as local constants. This fixes the clang
bootstrap abort.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107840 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index 5a24512277..5b566f675f 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -120,7 +120,9 @@ unsigned FastISel::getRegForValue(const Value *V) { // In bottom-up mode, just create the virtual register which will be used // to hold the value. It will be materialized later. - if (isa<Instruction>(V)) { + if (isa<Instruction>(V) && + (!isa<AllocaInst>(V) || + !FuncInfo.StaticAllocaMap.count(cast<AllocaInst>(V)))) { Reg = createResultReg(TLI.getRegClassFor(VT)); FuncInfo.ValueMap[V] = Reg; return Reg; |