aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-12-18 23:21:49 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-12-18 23:21:49 +0000
commitd742533dbc43f54798becb48ed7d3a2d97cf8150 (patch)
treea00a722b2af872c00555326077674bef7e3de4af /llvm/lib/CodeGen/MachineInstr.cpp
parent1cd71a771cbec872ea820f9226bcffb73c99efe8 (diff)
downloadllvm-d742533dbc43f54798becb48ed7d3a2d97cf8150.zip
llvm-d742533dbc43f54798becb48ed7d3a2d97cf8150.tar.gz
llvm-d742533dbc43f54798becb48ed7d3a2d97cf8150.tar.bz2
Use bidirectional bundle flags to simplify important functions.
The bundle_iterator::operator++ function now doesn't need to dig out the basic block and check against end(). It can use the isBundledWithSucc() flag to find the last bundled instruction safely. Similarly, MachineInstr::isBundled() no longer needs to look at iterators etc. It only has to look at flags. llvm-svn: 170473
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 3b83d02..ce77d61 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -909,16 +909,6 @@ void MachineInstr::unbundleFromSucc() {
Succ->clearFlag(BundledPred);
}
-/// 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();