diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2011-12-08 19:23:10 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2011-12-08 19:23:10 +0000 |
| commit | cdf89fdeafbe7daf31822c6eaa034915a259be31 (patch) | |
| tree | b99d06c65abd31b0caf839fdb2879f23cb82198e /llvm/lib/CodeGen/MachineInstr.cpp | |
| parent | 3294538546a395421cd68a6e207263bd73b61471 (diff) | |
| download | bcm5719-llvm-cdf89fdeafbe7daf31822c6eaa034915a259be31.tar.gz bcm5719-llvm-cdf89fdeafbe7daf31822c6eaa034915a259be31.zip | |
Make MachineInstr instruction property queries more flexible. This change all
clients to decide whether to look inside bundled instructions and whether
the query should return true if any / all bundled instructions have the
queried property.
llvm-svn: 146168
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 0471cf2e6ef..d16e5d44c78 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -749,24 +749,24 @@ void MachineInstr::addMemOperand(MachineFunction &MF, } bool -MachineInstr::hasProperty(unsigned MCFlag, bool PeekInBundle, bool IsOr) const { - if (!PeekInBundle || getOpcode() != TargetOpcode::BUNDLE) +MachineInstr::hasProperty(unsigned MCFlag, QueryType Type) const { + if (Type == IgnoreBundle || getOpcode() != TargetOpcode::BUNDLE) return getDesc().getFlags() & (1 << MCFlag); const MachineBasicBlock *MBB = getParent(); MachineBasicBlock::const_insn_iterator MII = *this; ++MII; while (MII != MBB->end() && MII->isInsideBundle()) { if (MII->getDesc().getFlags() & (1 << MCFlag)) { - if (IsOr) + if (Type == AnyInBundle) return true; } else { - if (!IsOr) + if (Type == AllInBundle) return false; } ++MII; } - return !IsOr; + return Type == AllInBundle; } bool MachineInstr::isIdenticalTo(const MachineInstr *Other, |

