aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.h')
-rw-r--r--contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.h49
1 files changed, 40 insertions, 9 deletions
diff --git a/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.h b/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.h
index adb92b6dc855..764d9ae9059a 100644
--- a/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.h
+++ b/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.h
@@ -1,18 +1,33 @@
-#ifndef HEXAGONVLIWPACKETIZER_H
-#define HEXAGONVLIWPACKETIZER_H
+//===- HexagonPacketizer.h - VLIW packetizer --------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONVLIWPACKETIZER_H
+#define LLVM_LIB_TARGET_HEXAGON_HEXAGONVLIWPACKETIZER_H
#include "llvm/CodeGen/DFAPacketizer.h"
-#include "llvm/CodeGen/MachineBranchProbabilityInfo.h"
+#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/ScheduleDAG.h"
-#include "llvm/CodeGen/ScheduleDAGInstrs.h"
+#include <vector>
namespace llvm {
+
class HexagonInstrInfo;
class HexagonRegisterInfo;
+class MachineBranchProbabilityInfo;
+class MachineFunction;
+class MachineInstr;
+class MachineLoopInfo;
+class TargetRegisterClass;
class HexagonPacketizerList : public VLIWPacketizerList {
// Vector of instructions assigned to the packet that has just been created.
- std::vector<MachineInstr*> OldPacketMIs;
+ std::vector<MachineInstr *> OldPacketMIs;
// Has the instruction been promoted to a dot-new instruction.
bool PromotedToDotNew;
@@ -23,6 +38,9 @@ class HexagonPacketizerList : public VLIWPacketizerList {
// Has the feeder instruction been glued to new value jump.
bool GlueToNewValueJump;
+ // This holds the offset value, when pruning the dependences.
+ int64_t ChangedOffset;
+
// Check if there is a dependence between some instruction already in this
// packet and this instruction.
bool Dependence;
@@ -31,6 +49,8 @@ class HexagonPacketizerList : public VLIWPacketizerList {
// schedule this instruction.
bool FoundSequentialDependence;
+ bool MemShufDisabled = false;
+
// Track MIs with ignored dependence.
std::vector<MachineInstr*> IgnoreDepMIs;
@@ -48,7 +68,6 @@ private:
const HexagonRegisterInfo *HRI;
public:
- // Ctor.
HexagonPacketizerList(MachineFunction &MF, MachineLoopInfo &MLI,
AliasAnalysis *AA,
const MachineBranchProbabilityInfo *MBPI);
@@ -72,6 +91,7 @@ public:
// and SUJ.
bool isLegalToPruneDependencies(SUnit *SUI, SUnit *SUJ) override;
+ bool foundLSInPacket();
MachineBasicBlock::iterator addToPacket(MachineInstr &MI) override;
void endPacket(MachineBasicBlock *MBB,
MachineBasicBlock::iterator MI) override;
@@ -80,6 +100,12 @@ public:
void unpacketizeSoloInstrs(MachineFunction &MF);
protected:
+ bool getmemShufDisabled() {
+ return MemShufDisabled;
+ };
+ void setmemShufDisabled(bool val) {
+ MemShufDisabled = val;
+ };
bool isCallDependent(const MachineInstr &MI, SDep::Kind DepType,
unsigned DepReg);
bool promoteToDotCur(MachineInstr &MI, SDep::Kind DepType,
@@ -103,14 +129,18 @@ protected:
bool demoteToDotOld(MachineInstr &MI);
bool useCallersSP(MachineInstr &MI);
void useCalleesSP(MachineInstr &MI);
+ bool updateOffset(SUnit *SUI, SUnit *SUJ);
+ void undoChangedOffset(MachineInstr &MI);
bool arePredicatesComplements(MachineInstr &MI1, MachineInstr &MI2);
bool restrictingDepExistInPacket(MachineInstr&, unsigned);
bool isNewifiable(const MachineInstr &MI, const TargetRegisterClass *NewRC);
bool isCurifiable(MachineInstr &MI);
bool cannotCoexist(const MachineInstr &MI, const MachineInstr &MJ);
- inline bool isPromotedToDotNew() const {
+
+ bool isPromotedToDotNew() const {
return PromotedToDotNew;
}
+
bool tryAllocateResourcesForConstExt(bool Reserve);
bool canReserveResourcesForConstExt();
void reserveResourcesForConstExt();
@@ -120,6 +150,7 @@ protected:
bool hasV4SpecificDependence(const MachineInstr &I, const MachineInstr &J);
bool producesStall(const MachineInstr &MI);
};
-} // namespace llvm
-#endif // HEXAGONVLIWPACKETIZER_H
+} // end namespace llvm
+
+#endif // LLVM_LIB_TARGET_HEXAGON_HEXAGONVLIWPACKETIZER_H