Move PHIElimination's SplitCriticalEdge for MachineBasicBlocks out

into a utility routine, teach it how to update MachineLoopInfo, and
make use of it in MachineLICM to split critical edges on demand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106555 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2010-06-22 17:25:57 +00:00
parent 6ff1c3f36c
commit 853d3fb8d2
5 changed files with 141 additions and 77 deletions

View File

@@ -64,13 +64,13 @@ class MachineLoopInfo : public MachineFunctionPass {
void operator=(const MachineLoopInfo &); // do not implement
MachineLoopInfo(const MachineLoopInfo &); // do not implement
LoopInfoBase<MachineBasicBlock, MachineLoop>& getBase() { return LI; }
public:
static char ID; // Pass identification, replacement for typeid
MachineLoopInfo() : MachineFunctionPass(&ID) {}
LoopInfoBase<MachineBasicBlock, MachineLoop>& getBase() { return LI; }
/// iterator/begin/end - The interface to the top-level loops in the current
/// function.
///