diff options
author | Dan Gohman <gohman@apple.com> | 2008-10-02 22:09:09 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-10-02 22:09:09 +0000 |
commit | 6ade6f55a836129af634074e96f660ff23f59a30 (patch) | |
tree | 9d3b8f495e13893431a3ae50ac05070bdce2cc4e /include/llvm/CodeGen | |
parent | e4a5ea3130129124a9d88e5e27d8bcf26f147fa0 (diff) | |
download | external_llvm-6ade6f55a836129af634074e96f660ff23f59a30.zip external_llvm-6ade6f55a836129af634074e96f660ff23f59a30.tar.gz external_llvm-6ade6f55a836129af634074e96f660ff23f59a30.tar.bz2 |
Add a new MachineBasicBlock utility function, isLayoutSuccessor, that
can be used when deciding if a block can transfer control to another
via a fall-through instead of a branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/MachineBasicBlock.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index b47108a..09cca93 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -234,6 +234,13 @@ public: /// block. bool isSuccessor(MachineBasicBlock *MBB) const; + /// isLayoutSuccessor - Return true if the specified MBB will be emitted + /// immediately after this block, such that if this block exits by + /// falling through, control will transfer to the specified MBB. Note + /// that MBB need not be a successor at all, for example if this block + /// ends with an unconditional branch to some other block. + bool isLayoutSuccessor(MachineBasicBlock *MBB) const; + /// getFirstTerminator - returns an iterator to the first terminator /// instruction of this basic block. If a terminator does not exist, /// it returns end() |