summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-07 23:52:58 +0000
committerDan Gohman <gohman@apple.com>2010-07-07 23:52:58 +0000
commiteb9164dc50ec2e532cd559f884a2785be9823b35 (patch)
treeeb53c8b59cc58a26c889beadc0fbfec0e17e9fe9 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
parent1adc499dda1f0f38c7cb0e3b7ab85f374c3fc788 (diff)
downloadbcm5719-llvm-eb9164dc50ec2e532cd559f884a2785be9823b35.tar.gz
bcm5719-llvm-eb9164dc50ec2e532cd559f884a2785be9823b35.zip
Don't forward-declare registers for static allocas, which we'll
prefer to materialize as local constants. This fixes the clang bootstrap abort. llvm-svn: 107840
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index 5a245122775..5b566f675fe 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud