Go to the documentation of this file.
16 #ifndef LLVM_MCA_CODEEMITTER_H
17 #define LLVM_MCA_CODEEMITTER_H
46 using EncodingInfo = std::pair<unsigned, unsigned>;
51 EncodingInfo getOrCreateEncodingInfo(
unsigned MCID);
56 : STI(
ST), MAB(AB), MCE(CE), VecOS(Code), Sequence(
S),
57 Encodings(
S.
size()) {}
60 EncodingInfo EI = getOrCreateEncodingInfo(MCID);
61 return StringRef(&Code[EI.first], EI.second);
68 #endif // LLVM_MCA_CODEEMITTER_H
This is an optimization pass for GlobalISel generic memory operations.
StringRef getEncoding(unsigned MCID)
CodeEmitter(const MCSubtargetInfo &ST, const MCAsmBackend &AB, const MCCodeEmitter &CE, ArrayRef< MCInst > S)
Generic interface to target specific assembler backends.
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.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef - Represent a constant reference to a string, i.e.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
MCCodeEmitter - Generic instruction encoding interface.
A raw_ostream that writes to an SmallVector or SmallString.
Generic base class for all target subtargets.