From f235f13931835b3335f3f2ff2d3060381b93626c Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Tue, 10 Nov 2009 22:01:05 +0000 Subject: 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 --- include/llvm/CodeGen/LiveVariables.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/llvm/CodeGen') diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h index 172fb75..c9b92e9 100644 --- a/include/llvm/CodeGen/LiveVariables.h +++ b/include/llvm/CodeGen/LiveVariables.h @@ -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 -- cgit v1.1