mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 17:32:36 +00:00
Don't read PreRegAlloc before it is initialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150286 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f06dfa7860
commit
fd3d4cf0ef
@ -311,12 +311,6 @@ static bool LoopIsOuterMostWithPredecessor(MachineLoop *CurLoop) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool MachineLICM::runOnMachineFunction(MachineFunction &MF) {
|
bool MachineLICM::runOnMachineFunction(MachineFunction &MF) {
|
||||||
if (PreRegAlloc)
|
|
||||||
DEBUG(dbgs() << "******** Pre-regalloc Machine LICM: ");
|
|
||||||
else
|
|
||||||
DEBUG(dbgs() << "******** Post-regalloc Machine LICM: ");
|
|
||||||
DEBUG(dbgs() << MF.getFunction()->getName() << " ********\n");
|
|
||||||
|
|
||||||
Changed = FirstInLoop = false;
|
Changed = FirstInLoop = false;
|
||||||
TM = &MF.getTarget();
|
TM = &MF.getTarget();
|
||||||
TII = TM->getInstrInfo();
|
TII = TM->getInstrInfo();
|
||||||
@ -328,6 +322,12 @@ bool MachineLICM::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
|
|
||||||
PreRegAlloc = MRI->isSSA();
|
PreRegAlloc = MRI->isSSA();
|
||||||
|
|
||||||
|
if (PreRegAlloc)
|
||||||
|
DEBUG(dbgs() << "******** Pre-regalloc Machine LICM: ");
|
||||||
|
else
|
||||||
|
DEBUG(dbgs() << "******** Post-regalloc Machine LICM: ");
|
||||||
|
DEBUG(dbgs() << MF.getFunction()->getName() << " ********\n");
|
||||||
|
|
||||||
if (PreRegAlloc) {
|
if (PreRegAlloc) {
|
||||||
// Estimate register pressure during pre-regalloc pass.
|
// Estimate register pressure during pre-regalloc pass.
|
||||||
unsigned NumRC = TRI->getNumRegClasses();
|
unsigned NumRC = TRI->getNumRegClasses();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user