mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-10 05:41:40 +00:00
Add a flag to MBBs to indicate whether it is an eh landing pad.
llvm-svn: 34474
This commit is contained in:
parent
534bc5a9a3
commit
8fdff03f2b
@ -74,10 +74,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 +157,18 @@ 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; }
|
||||
|
||||
/// 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
|
||||
|
Loading…
Reference in New Issue
Block a user