summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-03-17 17:03:45 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-03-17 17:03:45 +0000
commit97f889f43b28b5f7a83fc09ab699586d50a8e7ab (patch)
tree9a1c88836501e59405a8bfa3eefb640aa3221678 /llvm/lib
parent3ec7c4574f347c63034e840ee4211f1781c55fc0 (diff)
downloadbcm5719-llvm-97f889f43b28b5f7a83fc09ab699586d50a8e7ab.tar.gz
bcm5719-llvm-97f889f43b28b5f7a83fc09ab699586d50a8e7ab.zip
MachineInstr: Inline the fast path (non-bundle instruction) of hasProperty.
This is particularly helpful as both arguments tend to be constants. llvm-svn: 152991
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 0397ff5c949..43af1addca9 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -751,15 +751,11 @@ void MachineInstr::addMemOperand(MachineFunction &MF,
NumMemRefs = NewNum;
}
-bool
-MachineInstr::hasProperty(unsigned MCFlag, QueryType Type) const {
- if (Type == IgnoreBundle || !isBundle())
- return getDesc().getFlags() & (1 << MCFlag);
-
+bool MachineInstr::hasPropertyInBundle(unsigned Mask, QueryType Type) const {
const MachineBasicBlock *MBB = getParent();
MachineBasicBlock::const_instr_iterator MII = *this; ++MII;
while (MII != MBB->end() && MII->isInsideBundle()) {
- if (MII->getDesc().getFlags() & (1 << MCFlag)) {
+ if (MII->getDesc().getFlags() & Mask) {
if (Type == AnyInBundle)
return true;
} else {
OpenPOWER on IntegriCloud