diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-11-10 22:01:05 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-11-10 22:01:05 +0000 |
commit | f235f13931835b3335f3f2ff2d3060381b93626c (patch) | |
tree | 3388d35b748a3c11118e4f20203141a6c76599e3 /include/llvm/CodeGen | |
parent | e35e3c33dc5533dd1e8ab7d9f4039cc1429d56aa (diff) | |
download | external_llvm-f235f13931835b3335f3f2ff2d3060381b93626c.zip external_llvm-f235f13931835b3335f3f2ff2d3060381b93626c.tar.gz external_llvm-f235f13931835b3335f3f2ff2d3060381b93626c.tar.bz2 |
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
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/LiveVariables.h | 9 |
1 files changed, 8 insertions, 1 deletions
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 |