Allow any MachineBasicBlock (not just the entry block) to have live-in physical
registers. Make sure liveinterval analysis is correctly creating live ranges for them. llvm-svn: 34217
This commit is contained in:
@@ -254,14 +254,6 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
|
||||
/// Get some space for a respectable number of registers...
|
||||
VirtRegInfo.resize(64);
|
||||
|
||||
// Mark live-in registers as live-in.
|
||||
for (MachineFunction::livein_iterator I = MF.livein_begin(),
|
||||
E = MF.livein_end(); I != E; ++I) {
|
||||
assert(MRegisterInfo::isPhysicalRegister(I->first) &&
|
||||
"Cannot have a live-in virtual register!");
|
||||
HandlePhysRegDef(I->first, 0);
|
||||
}
|
||||
|
||||
analyzePHINodes(MF);
|
||||
|
||||
// Calculate live variable information in depth first order on the CFG of the
|
||||
@@ -275,6 +267,14 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
|
||||
E = df_ext_end(Entry, Visited); DFI != E; ++DFI) {
|
||||
MachineBasicBlock *MBB = *DFI;
|
||||
|
||||
// Mark live-in registers as live-in.
|
||||
for (MachineBasicBlock::livein_iterator II = MBB->livein_begin(),
|
||||
EE = MBB->livein_end(); II != EE; ++II) {
|
||||
assert(MRegisterInfo::isPhysicalRegister(*II) &&
|
||||
"Cannot have a live-in virtual register!");
|
||||
HandlePhysRegDef(*II, 0);
|
||||
}
|
||||
|
||||
// Loop over all of the instructions, processing them.
|
||||
for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();
|
||||
I != E; ++I) {
|
||||
|
||||
Reference in New Issue
Block a user