Move getBundleStart() into MachineInstrBundle.h.

This allows the function to be inlined, and makes it suitable for use in
getInstructionIndex().

Also provide a const version. C++ is great for touch typing practice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151782 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2012-03-01 01:26:01 +00:00
parent b519a0fe0e
commit 741981adf3
5 changed files with 20 additions and 22 deletions
-10
View File
@@ -900,16 +900,6 @@ bool MachineInstr::isBundled() const {
return nextMI != Parent->instr_end() && nextMI->isInsideBundle();
}
MachineInstr* MachineInstr::getBundleStart() {
if (!isInsideBundle())
return this;
MachineBasicBlock::reverse_instr_iterator MII(this);
++MII;
while (MII->isInsideBundle())
++MII;
return &*MII;
}
bool MachineInstr::isStackAligningInlineAsm() const {
if (isInlineAsm()) {
unsigned ExtraInfo = getOperand(InlineAsm::MIOp_ExtraInfo).getImm();