16#ifndef LLVM_MCA_CODEEMITTER_H
17#define LLVM_MCA_CODEEMITTER_H
44 using EncodingInfo = std::pair<unsigned, unsigned>;
49 EncodingInfo getOrCreateEncodingInfo(
unsigned MCID);
54 : STI(ST), MAB(AB), MCE(CE), Sequence(S), Encodings(S.
size()) {}
57 EncodingInfo EI = getOrCreateEncodingInfo(MCID);
58 return StringRef(&Code[EI.first], EI.second);
This file defines the SmallString class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Generic interface to target specific assembler backends.
MCCodeEmitter - Generic instruction encoding interface.
Generic base class for all target subtargets.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
A utility class used to compute instruction encodings for a code region.
CodeEmitter(const MCSubtargetInfo &ST, const MCAsmBackend &AB, const MCCodeEmitter &CE, ArrayRef< MCInst > S)
StringRef getEncoding(unsigned MCID)
This is an optimization pass for GlobalISel generic memory operations.
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.