forked from OSchip/llvm-project
The last commit was overly conservative. It's ok to reuse value that's already marked livein.
llvm-svn: 65498
This commit is contained in:
parent
ee5fd035e2
commit
ca2d65467b
|
@ -516,18 +516,11 @@ void AvailableSpills::AddAvailableRegsToLiveIn(MachineBasicBlock &MBB,
|
||||||
I = PhysRegsAvailable.begin(), E = PhysRegsAvailable.end();
|
I = PhysRegsAvailable.begin(), E = PhysRegsAvailable.end();
|
||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
unsigned Reg = I->first;
|
unsigned Reg = I->first;
|
||||||
bool MakeAvail = true;
|
|
||||||
const TargetRegisterClass* RC = TRI->getPhysicalRegisterRegClass(Reg);
|
const TargetRegisterClass* RC = TRI->getPhysicalRegisterRegClass(Reg);
|
||||||
// FIXME: A temporary workaround. We can't reuse available value if it's
|
// FIXME: A temporary workaround. We can't reuse available value if it's
|
||||||
// not safe to move the def of the virtual register's class. e.g.
|
// not safe to move the def of the virtual register's class. e.g.
|
||||||
// X86::RFP* register classes. Do not add it as a live-in.
|
// X86::RFP* register classes. Do not add it as a live-in.
|
||||||
if (!TII->isSafeToMoveRegClassDefs(RC))
|
if (!TII->isSafeToMoveRegClassDefs(RC))
|
||||||
MakeAvail = false;
|
|
||||||
if (MBB.isLiveIn(Reg))
|
|
||||||
// It's already livein somehow. Be conservative, do not make it available.
|
|
||||||
MakeAvail = false;
|
|
||||||
|
|
||||||
if (!MakeAvail)
|
|
||||||
// This is no longer available.
|
// This is no longer available.
|
||||||
NotAvailable.insert(Reg);
|
NotAvailable.insert(Reg);
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin9
|
; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin9
|
||||||
; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin9 -stats |& grep asm-printer | grep 185
|
; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin9 -stats |& grep asm-printer | grep 186
|
||||||
|
|
||||||
%"struct.Adv5::Ekin<3>" = type <{ i8 }>
|
%"struct.Adv5::Ekin<3>" = type <{ i8 }>
|
||||||
%"struct.Adv5::X::Energyflux<3>" = type { double }
|
%"struct.Adv5::X::Energyflux<3>" = type { double }
|
||||||
|
|
Loading…
Reference in New Issue