[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineBasicBlock.h

Evan Cheng evan.cheng at apple.com
Mon Jun 18 15:44:21 PDT 2007



Changes in directory llvm/include/llvm/CodeGen:

MachineBasicBlock.h updated: 1.65 -> 1.66
---
Log message:

Move CorrectExtraCFGEdges() from BranchFolding.cpp to a MachineBasicBlock method.

---
Diffs of the changes:  (+10 -0)

 MachineBasicBlock.h |   10 ++++++++++
 1 files changed, 10 insertions(+)


Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h
diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.65 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.66
--- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.65	Mon Jun  4 01:41:17 2007
+++ llvm/include/llvm/CodeGen/MachineBasicBlock.h	Mon Jun 18 17:43:58 2007
@@ -250,6 +250,16 @@
   /// '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;






More information about the llvm-commits mailing list