18CodeEmitter::EncodingInfo CodeEmitter::getOrCreateEncodingInfo(
unsigned MCID) {
23 SmallVector<llvm::MCFixup, 2>
Fixups;
24 const MCInst &Inst = Sequence[MCID];
29 EI.first = Code.
size();
31 EI.second = Code.
size() - EI.first;
A utility class used to compute instruction encodings.
std::pair< UnicodeEncodingForm, unsigned > EncodingInfo
EncodingInfo - Holds the encoding type and length of the byte order mark if it exists.
virtual void relaxInstruction(MCInst &Inst, const MCSubtargetInfo &STI) const
Relax the instruction in the given fragment to the next wider instruction.
virtual bool mayNeedRelaxation(const MCInst &Inst, const MCSubtargetInfo &STI) const
Check whether the given instruction may need relaxation.
virtual void encodeInstruction(const MCInst &Inst, SmallVectorImpl< char > &CB, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const =0
Encode the given Inst to bytes and append to CB.
This is an optimization pass for GlobalISel generic memory operations.