summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-02-08 02:17:25 +0000
committerAndrew Trick <atrick@apple.com>2012-02-08 02:17:25 +0000
commit3bc0e0c651b6b2a91f333634a09ad31f7ff9c22e (patch)
tree7e7b606fc299da73d29e72cfd34916826b53a818 /llvm/lib/CodeGen
parente57583ab19b7b145d100b376fecf47db0fa5808a (diff)
downloadbcm5719-llvm-3bc0e0c651b6b2a91f333634a09ad31f7ff9c22e.tar.gz
bcm5719-llvm-3bc0e0c651b6b2a91f333634a09ad31f7ff9c22e.zip
Added MachineInstr::isBundled() to check if an instruction is part of a bundle.
llvm-svn: 150044
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp2
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp10
2 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index cea75ef4b4d..4da4997ab67 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -904,7 +904,7 @@ void LiveIntervals::moveInstr(MachineBasicBlock::iterator insertPt,
assert((insertPt == mbb->end() || insertPt->getParent() == mbb) &&
"Cannot handle moves across basic block boundaries.");
assert(&*insertPt != mi && "No-op move requested?");
- assert(!mi->isInsideBundle() && "Can't handle bundled instructions yet.");
+ assert(!mi->isBundled() && "Can't handle bundled instructions yet.");
// Grab the original instruction index.
SlotIndex origIdx = indexes_->getInstructionIndex(mi);
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index de2082a779b..fc5822da077 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud