[llvm-commits] [llvm] r107840 - /llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Dan Gohman
gohman at apple.com
Wed Jul 7 16:52:58 PDT 2010
Author: djg
Date: Wed Jul 7 18:52:58 2010
New Revision: 107840
URL: http://llvm.org/viewvc/llvm-project?rev=107840&view=rev
Log:
Don't forward-declare registers for static allocas, which we'll
prefer to materialize as local constants. This fixes the clang
bootstrap abort.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=107840&r1=107839&r2=107840&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Wed Jul 7 18:52:58 2010
@@ -120,7 +120,9 @@
// 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;
More information about the llvm-commits
mailing list