16 #ifndef LLVM_MCA_CODEEMITTER_H 17 #define LLVM_MCA_CODEEMITTER_H 50 using EncodingInfo = std::pair<unsigned, unsigned>;
55 EncodingInfo getOrCreateEncodingInfo(
unsigned MCID);
60 : STI(ST), MAB(AB), MCE(CE), VecOS(Code), Sequence(S),
61 Encodings(S.
size()) {}
64 EncodingInfo EI = getOrCreateEncodingInfo(MCID);
65 return StringRef(&Code[EI.first], EI.second);
72 #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.
Helper functions used by various pipeline components.
auto size(R &&Range, typename std::enable_if< std::is_same< typename std::iterator_traits< decltype(Range.begin())>::iterator_category, std::random_access_iterator_tag >::value, void >::type *=nullptr) -> decltype(std::distance(Range.begin(), Range.end()))
Get the size of a range.
Generic base class for all target subtargets.
This file defines abstractions used by the Pipeline to model register reads, register writes and inst...
A utility class used to compute instruction encodings for a code region.
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)