15 #ifndef LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCCHECKER_H 16 #define LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCCHECKER_H 32 class MCSubtargetInfo;
44 using PredSense = std::pair<unsigned, bool>;
45 static const PredSense Unconditional;
46 using PredSet = std::multiset<PredSense>;
47 using PredSetIterator = std::multiset<PredSense>::iterator;
53 using SoftDefsIterator = std::set<unsigned>::iterator;
54 std::set<unsigned> SoftDefs;
57 using TmpDefsIterator = std::set<unsigned>::iterator;
58 std::set<unsigned> TmpDefs;
61 using NewPredsIterator = std::set<unsigned>::iterator;
62 std::set<unsigned> NewPreds;
65 using LatePredsIterator = std::multiset<unsigned>::iterator;
66 std::multiset<unsigned> LatePreds;
69 using UsesIterator = std::set<unsigned>::iterator;
70 std::set<unsigned> Uses;
73 using ReadOnlyIterator = std::set<unsigned>::iterator;
74 std::set<unsigned> ReadOnly;
78 void initReg(
MCInst const &,
unsigned,
unsigned &PredReg,
bool &isTrue);
80 bool registerUsed(
unsigned Register);
81 std::tuple<MCInst const *, unsigned, HexagonMCInstrInfo::PredicateInfo>
82 registerProducer(
unsigned Register,
87 bool checkPredicates();
88 bool checkNewValues();
89 bool checkRegisters();
90 bool checkRegistersReadOnly();
91 void checkRegisterCurDefs();
99 static void compoundRegisterMap(
unsigned &);
101 bool isPredicateRegister(
unsigned R)
const {
102 return (Hexagon::P0 == R || Hexagon::P1 == R || Hexagon::P2 == R ||
106 bool isLoopRegister(
unsigned R)
const {
107 return (Hexagon::SA0 == R || Hexagon::LC0 == R || Hexagon::SA1 == R ||
118 bool check(
bool FullCheck =
true);
130 #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)
Promote Memory to Register
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.