16 #ifndef LLVM_MCA_CODEEMITTER_H 17 #define LLVM_MCA_CODEEMITTER_H 47 using EncodingInfo = std::pair<unsigned, unsigned>;
52 EncodingInfo getOrCreateEncodingInfo(
unsigned MCID);
57 : STI(
ST), MAB(AB), MCE(CE), VecOS(Code), Sequence(S),
58 Encodings(S.
size()) {}
61 EncodingInfo EI = getOrCreateEncodingInfo(MCID);
62 return StringRef(&Code[EI.first], EI.second);
69 #endif // LLVM_MCA_CODEEMITTER_H
This class represents lattice values for constants.
A raw_ostream that writes to an SmallVector or SmallString.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
MCCodeEmitter - Generic instruction encoding interface.
Generic base class for all target subtargets.
A utility class used to compute instruction encodings for a code region.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
StringRef getEncoding(unsigned MCID)
Generic interface to target specific assembler backends.
StringRef - Represent a constant reference to a string, i.e.
CodeEmitter(const MCSubtargetInfo &ST, const MCAsmBackend &AB, const MCCodeEmitter &CE, ArrayRef< MCInst > S)