diff options
author | Andrew Trick <atrick@apple.com> | 2012-02-08 02:17:25 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-02-08 02:17:25 +0000 |
commit | 99a7a13f4aa5bf8f272c95f7b09ba997d2b30a35 (patch) | |
tree | 5f4693eb6e8c5f69494c69274979dbc22af18c98 /lib/CodeGen/MachineInstr.cpp | |
parent | 291411c7a164dd1b347b5ef21e062120efac3db7 (diff) |
Added MachineInstr::isBundled() to check if an instruction is part of a bundle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index de2082a779..fc5822da07 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -890,6 +890,16 @@ unsigned MachineInstr::getNumExplicitOperands() const { return NumOperands; } +/// isBundled - Return true if this instruction part of a bundle. This is true +/// if either itself or its following instruction is marked "InsideBundle". +bool MachineInstr::isBundled() const { + if (isInsideBundle()) + return true; + MachineBasicBlock::const_instr_iterator nextMI = this; + ++nextMI; + return nextMI != Parent->instr_end() && nextMI->isInsideBundle(); +} + bool MachineInstr::isStackAligningInlineAsm() const { if (isInlineAsm()) { unsigned ExtraInfo = getOperand(InlineAsm::MIOp_ExtraInfo).getImm(); |