aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/LiveVariables.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2009-11-11 19:31:31 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2009-11-11 19:31:31 +0000
commit3e20475feebca3bfb29375ac7f3e5acbeb2a95c8 (patch)
treeab6b159d6b6c15d5278703254f21998e6f66e0d1 /include/llvm/CodeGen/LiveVariables.h
parenteba4ed9cbb8dc4d478c71b5cbe5b846ac79c105d (diff)
Fix liveness calculation when splitting critical edges during PHI elimination.
- Edges are split before any phis are eliminated, so the code is SSA. - Create a proper IR BasicBlock for the split edges. - LiveVariables::addNewBlock now has same syntax as MachineDominatorTree::addNewBlock. Algorithm calculates predecessor live-out set rather than successor live-in set. This feature still causes some miscompilations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveVariables.h')
-rw-r--r--include/llvm/CodeGen/LiveVariables.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h
index c9b92e9e7f..b2be569bc1 100644
--- a/include/llvm/CodeGen/LiveVariables.h
+++ b/include/llvm/CodeGen/LiveVariables.h
@@ -267,9 +267,11 @@ public:
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);
+ /// addNewBlock - Add a new basic block BB as an empty succcessor to
+ /// DomBB. All variables that are live out of DomBB will be marked as passing
+ /// live through BB. This method assumes that the machine code is still in SSA
+ /// form.
+ void addNewBlock(MachineBasicBlock *BB, MachineBasicBlock *DomBB);
};
} // End llvm namespace