mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-04 16:01:46 +00:00
In bottom-up mode, defer the materialization of local constant values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103139 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a7a0ed7901
commit
97c94b8fc6
@ -84,6 +84,17 @@ unsigned FastISel::getRegForValue(const Value *V) {
|
|||||||
if (Reg != 0)
|
if (Reg != 0)
|
||||||
return Reg;
|
return Reg;
|
||||||
|
|
||||||
|
// In bottom-up mode, just create the virtual register which will be used
|
||||||
|
// to hold the value. It will be materialized later.
|
||||||
|
if (IsBottomUp) {
|
||||||
|
Reg = createResultReg(TLI.getRegClassFor(VT));
|
||||||
|
if (isa<Instruction>(V))
|
||||||
|
ValueMap[V] = Reg;
|
||||||
|
else
|
||||||
|
LocalValueMap[V] = Reg;
|
||||||
|
return Reg;
|
||||||
|
}
|
||||||
|
|
||||||
return materializeRegForValue(V, VT);
|
return materializeRegForValue(V, VT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user