mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-05 11:19:41 +00:00
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
This commit is contained in:
parent
61b7cea126
commit
49dcb0f9ec
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user