Changes in directory llvm/include/llvm/CodeGen:
MachineBasicBlock.h updated: 1.58 -> 1.59 --- Log message: Add a flag to MBBs to indicate whether it is an eh landing pad. --- Diffs of the changes: (+18 -1) MachineBasicBlock.h | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.58 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.59 --- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.58 Mon Feb 19 15:49:53 2007 +++ llvm/include/llvm/CodeGen/MachineBasicBlock.h Wed Feb 21 16:39:52 2007 @@ -74,10 +74,15 @@ /// 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 +157,18 @@ 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; } + + /// isAccessable - Returns true if the block is alive. That is, if it has + /// predecessors or is an eh landing pad. + bool isAccessable() const { return !pred_empty() || isLandingPad(); } + // Code Layout methods. /// moveBefore/moveAfter - move 'this' block before or after the specified _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits