Teach PHIElimination to split critical edges when -split-phi-edges is enabled.

Critical edges leading to a PHI node are split when the PHI source variable is
live out from the predecessor block. This help the coalescer eliminate more
PHI joins.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86725 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2009-11-10 22:01:05 +00:00
parent e35e3c33dc
commit f235f13931
4 changed files with 133 additions and 5 deletions

View File

@ -103,7 +103,10 @@ public:
Kills.erase(I);
return true;
}
/// findKill - Find a kill instruction in MBB. Return NULL if none is found.
MachineInstr *findKill(const MachineBasicBlock *MBB) const;
void dump() const;
};
@ -263,6 +266,10 @@ public:
void HandleVirtRegDef(unsigned reg, MachineInstr *MI);
void HandleVirtRegUse(unsigned reg, MachineBasicBlock *MBB,
MachineInstr *MI);
/// addNewBlock - Add a new basic block A as an empty predecessor of B. All
/// variables that are live into B will be marked as passing live through A.
void addNewBlock(MachineBasicBlock *A, MachineBasicBlock *B);
};
} // End llvm namespace