21 #ifndef LLVM_CODEGEN_GLOBALISEL_MACHINELEGALIZEHELPER_H 22 #define LLVM_CODEGEN_GLOBALISEL_MACHINELEGALIZEHELPER_H 34 class MachineRegisterInfo;
35 class GISelChangeObserver;
111 unsigned TruncOpcode = TargetOpcode::G_TRUNC);
116 void extractParts(
unsigned Reg,
LLT Ty,
int NumParts,
const LegalizerInfo & getLegalizerInfo() const
Expose LegalizerInfo so the clients can re-use.
This class represents lattice values for constants.
Libcall
RTLIB::Libcall enum - This enum defines all of the runtime library calls the backend can emit...
MachineIRBuilder & MIRBuilder
Expose MIRBuilder so clients can set their own RecordInsertInstruction functions. ...
LegalizeResult widenScalar(MachineInstr &MI, unsigned TypeIdx, LLT WideTy)
Legalize an instruction by performing the operation on a wider scalar type (for example a 16-bit addi...
LegalizerHelper::LegalizeResult createLibcall(MachineIRBuilder &MIRBuilder, RTLIB::Libcall Libcall, const CallLowering::ArgInfo &Result, ArrayRef< CallLowering::ArgInfo > Args)
Helper function that creates the given libcall.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
LegalizerHelper(MachineFunction &MF, GISelChangeObserver &Observer, MachineIRBuilder &B)
Abstract class that contains various methods for clients to notify about changes. ...
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
LegalizeResult legalizeInstrStep(MachineInstr &MI)
Replace MI by a sequence of legal instructions that can implement the same operation.
Helper class to build MachineInstr.
Some kind of error has occurred and we could not legalize this instruction.
Instruction was already legal and no change was made to the MachineFunction.
LegalizeResult moreElementsVector(MachineInstr &MI, unsigned TypeIdx, LLT WideTy)
Legalize a vector instruction by increasing the number of vector elements involved and ignoring the a...
LegalizeResult libcall(MachineInstr &MI)
Legalize an instruction by emiting a runtime library call instead.
LegalizeResult lower(MachineInstr &MI, unsigned TypeIdx, LLT Ty)
Legalize an instruction by splitting it into simpler parts, hopefully understood by the target...
LegalizeResult fewerElementsVector(MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
Legalize a vector instruction by splitting into multiple components, each acting on the same scalar t...
This file declares the MachineIRBuilder class.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Representation of each machine instruction.
Instruction has been legalized and the MachineFunction changed.
LegalizeResult narrowScalar(MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy)
Legalize an instruction by reducing the width of the underlying scalar type.
This file describes how to lower LLVM calls to machine code calls.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.