aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-03-01 01:26:01 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-03-01 01:26:01 +0000
commit741981adf3a2bc0c6652c9c4ec846250950f3e68 (patch)
treeff48140195f34e487c7ea9178a12a397e04b8c37 /lib
parentb519a0fe0ee02804cc77cb9c40ded6604341b71c (diff)
downloadexternal_llvm-741981adf3a2bc0c6652c9c4ec846250950f3e68.tar.gz
external_llvm-741981adf3a2bc0c6652c9c4ec846250950f3e68.tar.bz2
external_llvm-741981adf3a2bc0c6652c9c4ec846250950f3e68.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp2
-rw-r--r--lib/CodeGen/MachineInstr.cpp10
2 files changed, 1 insertions, 11 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 03ca72e081..3e16efa728 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -1522,7 +1522,7 @@ void LiveIntervals::handleMove(MachineInstr* MI) {
SlotIndex OldIndex = indexes_->getInstructionIndex(MI);
indexes_->removeMachineInstrFromMaps(MI);
SlotIndex NewIndex = MI->isInsideBundle() ?
- indexes_->getInstructionIndex(MI->getBundleStart()) :
+ indexes_->getInstructionIndex(MI) :
indexes_->insertMachineInstrInMaps(MI);
assert(getMBBStartIdx(MI->getParent()) <= OldIndex &&
OldIndex < getMBBEndIdx(MI->getParent()) &&
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 3ab98e1bf5..ff32a66b14 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -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();