mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
- Add MachineInstrBundle.h and MachineInstrBundle.cpp. This includes a function
to finalize MI bundles (i.e. add BUNDLE instruction and computing register def and use lists of the BUNDLE instruction) and a pass to unpack bundles. - Teach more of MachineBasic and MachineInstr methods to be bundle aware. - Switch Thumb2 IT block to MI bundles and delete the hazard recognizer hack to prevent IT blocks from being broken apart. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146542 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -175,6 +175,11 @@ public:
|
||||
Flags = flags;
|
||||
}
|
||||
|
||||
/// clearFlag - Clear a MI flag.
|
||||
void clearFlag(MIFlag Flag) {
|
||||
Flags &= ~((uint8_t)Flag);
|
||||
}
|
||||
|
||||
/// isInsideBundle - Return true if MI is in a bundle (but not the first MI
|
||||
/// in a bundle).
|
||||
///
|
||||
@@ -215,6 +220,15 @@ public:
|
||||
return getFlag(InsideBundle);
|
||||
}
|
||||
|
||||
/// setIsInsideBundle - Set InsideBundle bit.
|
||||
///
|
||||
void setIsInsideBundle(bool Val = true) {
|
||||
if (Val)
|
||||
setFlag(InsideBundle);
|
||||
else
|
||||
clearFlag(InsideBundle);
|
||||
}
|
||||
|
||||
/// getDebugLoc - Returns the debug location id of this MachineInstr.
|
||||
///
|
||||
DebugLoc getDebugLoc() const { return debugLoc; }
|
||||
@@ -589,6 +603,9 @@ public:
|
||||
bool isRegSequence() const {
|
||||
return getOpcode() == TargetOpcode::REG_SEQUENCE;
|
||||
}
|
||||
bool isBundle() const {
|
||||
return getOpcode() == TargetOpcode::BUNDLE;
|
||||
}
|
||||
bool isCopy() const {
|
||||
return getOpcode() == TargetOpcode::COPY;
|
||||
}
|
||||
@@ -608,6 +625,9 @@ public:
|
||||
getOperand(0).getSubReg() == getOperand(1).getSubReg();
|
||||
}
|
||||
|
||||
/// getBundleSize - Return the number of instructions inside the MI bundle.
|
||||
unsigned getBundleSize() const;
|
||||
|
||||
/// readsRegister - Return true if the MachineInstr reads the specified
|
||||
/// register. If TargetRegisterInfo is passed, then it also checks if there
|
||||
/// is a read of a super-register.
|
||||
|
Reference in New Issue
Block a user