Register scavenger is now capable of scavenging. It spills a register whose use of...
[oota-llvm.git] / include / llvm / CodeGen / MachineBasicBlock.h
index 661430c4807945c21fad113910977600f103b340..d076046407f28613c0d562b38218fc1546b8fb0d 100644 (file)
@@ -58,7 +58,6 @@ public:
 class BasicBlock;
 
 class MachineBasicBlock {
-public:
   typedef ilist<MachineInstr> Instructions;
   Instructions Insts;
   MachineBasicBlock *Prev, *Next;
@@ -74,10 +73,15 @@ public:
   /// LiveIns - Keep track of the physical registers that are livein of
   /// the basicblock.
   std::vector<unsigned> LiveIns;
+  
+  /// IsLandingPad - Indicate that this basic block is entered via an
+  /// exception handler.
+  bool IsLandingPad;
 
 public:
   MachineBasicBlock(const BasicBlock *bb = 0) : Prev(0), Next(0), BB(bb),
-                                                Number(-1), Parent(0) {
+                                                Number(-1), Parent(0),
+                                                IsLandingPad(false) {
     Insts.parent = this;
   }
 
@@ -152,6 +156,14 @@ public:
   const_livein_iterator livein_end()   const { return LiveIns.end(); }
   bool            livein_empty() const { return LiveIns.empty(); }
 
+  /// isLandingPad - Returns true if the block is a landing pad. That is
+  /// this basic block is entered via an exception handler.
+  bool isLandingPad() const { return IsLandingPad; }
+
+  /// setIsLandingPad - Indicates the block is a landing pad.  That is
+  /// this basic block is entered via an exception handler.
+  void setIsLandingPad() { IsLandingPad = true; }
+
   // Code Layout methods.
   
   /// moveBefore/moveAfter - move 'this' block before or after the specified