[llvm] r328367 - [Hexagon] Make findLoopInstr member of HexagonInstrInfo
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 23 13:43:02 PDT 2018
Author: kparzysz
Date: Fri Mar 23 13:43:02 2018
New Revision: 328367
URL: http://llvm.org/viewvc/llvm-project?rev=328367&view=rev
Log:
[Hexagon] Make findLoopInstr member of HexagonInstrInfo
Modified:
llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp
llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.h
Modified: llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp?rev=328367&r1=328366&r2=328367&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp Fri Mar 23 13:43:02 2018
@@ -144,9 +144,9 @@ static unsigned nonDbgMICount(MachineBas
/// 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(con
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() &&
Modified: llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.h?rev=328367&r1=328366&r2=328367&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.h (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.h Fri Mar 23 13:43:02 2018
@@ -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;
More information about the llvm-commits
mailing list