[Hexagon] Make findLoopInstr member of HexagonInstrInfo
llvm-svn: 328367
This commit is contained in:
parent
8038dad7db
commit
998df2ca4f
|
@ -144,9 +144,9 @@ static unsigned nonDbgMICount(MachineBasicBlock::const_instr_iterator MIB,
|
|||
/// On Hexagon, we have two instructions used to set-up the hardware loop
|
||||
/// (LOOP0, LOOP1) with corresponding endloop (ENDLOOP0, ENDLOOP1) instructions
|
||||
/// to indicate the end of a loop.
|
||||
static MachineInstr *findLoopInstr(MachineBasicBlock *BB, unsigned EndLoopOp,
|
||||
MachineBasicBlock *TargetBB,
|
||||
SmallPtrSet<MachineBasicBlock *, 8> &Visited) {
|
||||
MachineInstr *HexagonInstrInfo::findLoopInstr(MachineBasicBlock *BB,
|
||||
unsigned EndLoopOp, MachineBasicBlock *TargetBB,
|
||||
SmallPtrSet<MachineBasicBlock *, 8> &Visited) const {
|
||||
unsigned LOOPi;
|
||||
unsigned LOOPr;
|
||||
if (EndLoopOp == Hexagon::ENDLOOP0) {
|
||||
|
@ -1886,6 +1886,10 @@ bool HexagonInstrInfo::isAccumulator(const MachineInstr &MI) const {
|
|||
return((F >> HexagonII::AccumulatorPos) & HexagonII::AccumulatorMask);
|
||||
}
|
||||
|
||||
bool HexagonInstrInfo::isBaseImmOffset(const MachineInstr &MI) const {
|
||||
return getAddrMode(MI) == HexagonII::BaseImmOffset;
|
||||
}
|
||||
|
||||
bool HexagonInstrInfo::isComplex(const MachineInstr &MI) const {
|
||||
return !isTC1(MI) && !isTC2Early(MI) && !MI.getDesc().mayLoad() &&
|
||||
!MI.getDesc().mayStore() &&
|
||||
|
|
|
@ -346,7 +346,11 @@ public:
|
|||
/// HexagonInstrInfo specifics.
|
||||
|
||||
unsigned createVR(MachineFunction *MF, MVT VT) const;
|
||||
MachineInstr *findLoopInstr(MachineBasicBlock *BB, unsigned EndLoopOp,
|
||||
MachineBasicBlock *TargetBB,
|
||||
SmallPtrSet<MachineBasicBlock *, 8> &Visited) const;
|
||||
|
||||
bool isBaseImmOffset(const MachineInstr &MI) const;
|
||||
bool isAbsoluteSet(const MachineInstr &MI) const;
|
||||
bool isAccumulator(const MachineInstr &MI) const;
|
||||
bool isAddrModeWithOffset(const MachineInstr &MI) const;
|
||||
|
|
Loading…
Reference in New Issue