aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineBasicBlock.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-06-18 22:43:58 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-06-18 22:43:58 +0000
commit2bdb7d0cc88881857073b36f4a09ebe2f2008c24 (patch)
tree1663b9eb98aa86412736aa12aba37e0c05066244 /include/llvm/CodeGen/MachineBasicBlock.h
parenteff2cdfca7fc9e39728e7d152d57891c27a3bde0 (diff)
Move CorrectExtraCFGEdges() from BranchFolding.cpp to a MachineBasicBlock method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37633 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineBasicBlock.h')
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index 790be6cb64..fe8a0ab300 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -250,6 +250,16 @@ public:
/// 'Old', change the code and CFG so that it branches to 'New' instead.
void ReplaceUsesOfBlockWith(MachineBasicBlock *Old, MachineBasicBlock *New);
+ /// CorrectExtraCFGEdges - Various pieces of code can cause excess edges in
+ /// the CFG to be inserted. If we have proven that MBB can only branch to
+ /// DestA and DestB, remove any other MBB successors from the CFG. DestA and
+ /// DestB can be null. Besides DestA and DestB, retain other edges leading
+ /// to LandingPads (currently there can be only one; we don't check or require
+ /// that here). Note it is possible that DestA and/or DestB are LandingPads.
+ bool CorrectExtraCFGEdges(MachineBasicBlock *DestA,
+ MachineBasicBlock *DestB,
+ bool isCond);
+
// Debugging methods.
void dump() const;
void print(std::ostream &OS) const;