15 #ifndef HEXAGONMCCHECKER_H
16 #define HEXAGONMCCHECKER_H
64 void setError(
unsigned e,
unsigned r = Hexagon::NoRegister)
66 void setWarning(
unsigned w,
unsigned r = Hexagon::NoRegister)
82 typedef std::pair<unsigned, bool> PredSense;
83 static const PredSense Unconditional;
84 typedef std::multiset<PredSense> PredSet;
85 typedef std::multiset<PredSense>::iterator PredSetIterator;
99 bool IsFloat, IsNVJ, Cond;
101 static NewSense Jmp(
bool isNVJ) {
102 NewSense NS = { 0,
false, isNVJ,
106 static NewSense
Use(
unsigned PR,
bool True) {
107 NewSense NS = { PR,
false,
false,
111 static NewSense
Def(
unsigned PR,
bool True,
bool Float) {
112 NewSense NS = { PR, Float,
false,
123 typedef std::set<unsigned>::iterator SoftDefsIterator;
124 std::set<unsigned> SoftDefs;
127 typedef std::set<unsigned>::iterator CurDefsIterator;
128 std::set<unsigned> CurDefs;
131 typedef std::set<unsigned>::iterator TmpDefsIterator;
132 std::set<unsigned> TmpDefs;
135 typedef std::set<unsigned>::iterator NewPredsIterator;
136 std::set<unsigned> NewPreds;
139 typedef std::multiset<unsigned>::iterator LatePredsIterator;
140 std::multiset<unsigned> LatePreds;
143 typedef std::set<unsigned>::iterator UsesIterator;
144 std::set<unsigned> Uses;
151 typedef std::set<unsigned>::iterator ReadOnlyIterator;
152 std::set<unsigned> ReadOnly;
154 std::queue<ErrInfo_T> ErrInfoQ;
158 if (bLoadErrInfo ==
true) {
159 if (ErrInfoQ.empty()) {
162 CrntErrInfo.
s = ErrInfoQ.front();
166 bLoadErrInfo =
false;
173 bool checkBranches();
174 bool checkPredicates();
175 bool checkNewValues();
176 bool checkRegisters();
181 static void compoundRegisterMap(
unsigned&);
183 bool isPredicateRegister(
unsigned R)
const {
184 return (Hexagon::P0 == R || Hexagon::P1 == R ||
185 Hexagon::P2 == R || Hexagon::P3 == R);
187 bool isLoopRegister(
unsigned R)
const {
188 return (Hexagon::SA0 == R || Hexagon::LC0 == R ||
189 Hexagon::SA1 == R || Hexagon::LC1 == R);
192 bool hasValidNewValueDef(
const NewSense &
Use,
211 return (ErrInfoQ.empty()) ?
false : (getErrInfo(),
true);
217 #endif // HEXAGONMCCHECKER_H
HexagonMCChecker(MCInstrInfo const &MCII, MCSubtargetInfo const &STI, MCInst &mcb, MCInst &mcbdx, const MCRegisterInfo &ri)
void setWarning(unsigned w, unsigned r=Hexagon::NoRegister)
unsigned getErrRegister()
A Use represents the edge between a Value definition and its users.
void addErrInfo(HexagonMCErrInfo &err)
add a new error/warning
unsigned getError()
Return the error code for the last operation in the insn bundle.
Instances of this class represent a single low-level machine instruction.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Interface to description of machine instruction set.
unsigned getShuffleError()
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
MCSubtargetInfo - Generic base class for all target subtargets.
void setShuffleError(unsigned e)
Check for a valid bundle.
This holds information about one operand of a machine instruction, indicating the register class for ...
void setError(unsigned e, unsigned r=Hexagon::NoRegister)