14 #ifndef LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCCHECKER_H 15 #define LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCCHECKER_H 31 class MCSubtargetInfo;
43 using PredSense = std::pair<unsigned, bool>;
44 static const PredSense Unconditional;
45 using PredSet = std::multiset<PredSense>;
46 using PredSetIterator = std::multiset<PredSense>::iterator;
52 using SoftDefsIterator = std::set<unsigned>::iterator;
53 std::set<unsigned> SoftDefs;
56 using TmpDefsIterator = std::set<unsigned>::iterator;
57 std::set<unsigned> TmpDefs;
60 using NewPredsIterator = std::set<unsigned>::iterator;
61 std::set<unsigned> NewPreds;
64 using LatePredsIterator = std::multiset<unsigned>::iterator;
65 std::multiset<unsigned> LatePreds;
68 using UsesIterator = std::set<unsigned>::iterator;
69 std::set<unsigned> Uses;
72 using ReadOnlyIterator = std::set<unsigned>::iterator;
73 std::set<unsigned> ReadOnly;
77 void initReg(
MCInst const &,
unsigned,
unsigned &PredReg,
bool &isTrue);
79 bool registerUsed(
unsigned Register);
80 std::tuple<MCInst const *, unsigned, HexagonMCInstrInfo::PredicateInfo>
81 registerProducer(
unsigned Register,
86 bool checkPredicates();
87 bool checkNewValues();
88 bool checkRegisters();
89 bool checkRegistersReadOnly();
90 void checkRegisterCurDefs();
98 static void compoundRegisterMap(
unsigned &);
100 bool isPredicateRegister(
unsigned R)
const {
101 return (Hexagon::P0 == R || Hexagon::P1 == R || Hexagon::P2 == R ||
105 bool isLoopRegister(
unsigned R)
const {
106 return (Hexagon::SA0 == R || Hexagon::LC0 == R || Hexagon::SA1 == R ||
117 bool check(
bool FullCheck =
true);
129 #endif // LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCCHECKER_H static bool Check(DecodeStatus &Out, DecodeStatus In)
void reportErrorNewValue(unsigned Register)
This class represents lattice values for constants.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
void reportError(SMLoc Loc, Twine const &Msg)
void reportWarning(Twine const &Msg)
Context object for machine code objects.
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...
void reportNote(SMLoc Loc, Twine const &Msg)
void reportBranchErrors()
Interface to description of machine instruction set.
HexagonMCChecker(MCContext &Context, MCInstrInfo const &MCII, MCSubtargetInfo const &STI, MCInst &mcb, const MCRegisterInfo &ri, bool ReportErrors=true)
void reportErrorRegisters(unsigned Register)
Generic base class for all target subtargets.
bool check(bool FullCheck=true)
Check for a valid bundle.
Represents a location in source code.
Wrapper class representing virtual and physical registers.