mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146168 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user