[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineBasicBlock.h
Evan Cheng
evan.cheng at apple.com
Wed Feb 21 16:17:52 PST 2007
On Feb 21, 2007, at 2:40 PM, Jim Laskey wrote:
> +
> + /// IsLandingPad - Indicate that this basic block is entered via an
> + /// exception handler.
> + bool IsLandingPad;
Since you are touching this... :-) Seems to me there is a way to
reorganize the fields within MachineBasicBlock to save some space
(not to mention putting them in a more "sensible" order). Can we
steal a bit from the "Number" field to indicate isLandingPad?
Evan
>
> 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 at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list