diff options
author | Dan Gohman <gohman@apple.com> | 2010-07-07 14:33:51 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-07-07 14:33:51 +0000 |
commit | d463a7446402f0771465fe66fe0a7d9f72534902 (patch) | |
tree | 4975eb0e5f1d7c265ec10c1195b420a983a81824 /include/llvm/CodeGen | |
parent | b8c86a010c2d958d6f655b0f66101d8964d7a0fc (diff) | |
download | external_llvm-d463a7446402f0771465fe66fe0a7d9f72534902.zip external_llvm-d463a7446402f0771465fe66fe0a7d9f72534902.tar.gz external_llvm-d463a7446402f0771465fe66fe0a7d9f72534902.tar.bz2 |
Add a getFirstNonPHI utility function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107778 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 dcbcb25..3cfc47a 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -282,6 +282,13 @@ public: /// branch to do so (e.g., a table jump). True is a conservative answer. bool canFallThrough(); + /// Returns a pointer to the first instructon in this block that is not a + /// PHINode instruction. When adding instruction to the beginning of the + /// basic block, they should be added before the returned value, not before + /// the first instruction, which might be PHI. + /// Returns end() is there's no non-PHI instruction. + iterator getFirstNonPHI(); + /// getFirstTerminator - returns an iterator to the first terminator /// instruction of this basic block. If a terminator does not exist, /// it returns end() |