14#ifndef LLVM_LIB_TARGET_BPF_BPFISELLOWERING_H
15#define LLVM_LIB_TARGET_BPF_BPFISELLOWERING_H
37 unsigned *)
const override;
42 std::pair<unsigned, const TargetRegisterClass *>
55 EVT VT)
const override;
77 bool AllowsMisalignedMemAccess;
91 template <
class NodeTy>
102 static const size_t MaxArgs;
124 const AttributeList &FuncAttributes)
const override {
125 return Op.size() >= 8 ? MVT::i64 : MVT::i32;
128 bool isIntDivCheap(EVT VT, AttributeList Attr)
const override {
132 bool shouldConvertConstantLoadToIntImm(
const APInt &Imm,
133 Type *Ty)
const override {
147 std::optional<unsigned> ByteOffset)
const override {
151 bool isLegalAddressingMode(
const DataLayout &
DL,
const AddrMode &AM,
152 Type *Ty,
unsigned AS,
153 Instruction *
I =
nullptr)
const override;
158 bool isTruncateFree(
Type *Ty1,
Type *Ty2)
const override;
159 bool isTruncateFree(EVT VT1, EVT VT2)
const override;
162 bool isZExtFree(
Type *Ty1,
Type *Ty2)
const override;
163 bool isZExtFree(EVT VT1, EVT VT2)
const override;
164 bool isZExtFree(
SDValue Val, EVT VT2)
const override;
166 unsigned EmitSubregExt(MachineInstr &
MI, MachineBasicBlock *BB,
unsigned Reg,
167 bool isSigned)
const;
169 MachineBasicBlock * EmitInstrWithCustomInserterMemcpy(MachineInstr &
MI,
170 MachineBasicBlock *BB)
173 EmitInstrWithCustomInserterLDimm64(MachineInstr &
MI,
174 MachineBasicBlock *BB)
const;
178 const SmallVectorImpl<ISD::OutputArg> &Outs,
179 LLVMContext &
Context,
const Type *RetTy)
const override;
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Function Alias Analysis Results
Register const TargetRegisterInfo * TRI
static SDValue LowerDYNAMIC_STACKALLOC(SDValue Op, SelectionDAG &DAG, const SparcSubtarget *Subtarget)
static SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad, bool isV9, bool is64Bit)
static SDValue LowerATOMIC_LOAD_STORE(SDValue Op, SelectionDAG &DAG)
static SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad, bool isV9, bool is64Bit)
This file describes how to lower LLVM code to machine code.
static SDValue LowerShiftParts(SDValue Op, SelectionDAG &DAG)
Lower SRA_PARTS and friends, which return two i32 values and take a 2 x i32 value to shift plus a shi...
static SDValue LowerCallResult(SDValue Chain, SDValue InGlue, const SmallVectorImpl< CCValAssign > &RVLocs, const SDLoc &dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals)
LowerCallResult - Lower the result values of a call into the appropriate copies out of appropriate ph...
BPFTargetLowering::ConstraintType getConstraintType(StringRef Constraint) const override
Given a constraint, return the type of constraint it is for this target.
Register getExceptionSelectorRegister(const Constant *) const override
If a physical register, this returns the register that receives the exception typeid on entry to a la...
unsigned getJumpTableEncoding() const override
Return the entry encoding for a jump table in the current function.
bool getHasJmpExt() const
bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const override
Return true if folding a constant offset with the given GlobalAddress is legal.
bool allowsMisalignedMemoryAccesses(EVT VT, unsigned, Align, MachineMemOperand::Flags, unsigned *) const override
Determine if the target supports unaligned memory accesses.
EVT getSetCCResultType(const DataLayout &DL, LLVMContext &Context, EVT VT) const override
Return the ValueType of the result of SETCC operations.
Register getExceptionPointerRegister(const Constant *) const override
If a physical register, this returns the register that receives the exception address on entry to an ...
BPFTargetLowering(const TargetMachine &TM, const BPFSubtarget &STI)
SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override
This callback is invoked for operations that are unsupported by the target, which are registered to u...
MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr &MI, MachineBasicBlock *BB) const override
This method should be implemented by targets that mark instructions with the 'usesCustomInserter' fla...
MVT getScalarShiftAmountTy(const DataLayout &, EVT) const override
Return the type to use for a scalar shift opcode, given the shifted amount type.
std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const override
Given a physical register constraint (e.g.
This is an important base class in LLVM.
A parsed version of the target data layout string in and methods for querying it.
This is an important class for using LLVM in a threaded context.
Representation of each machine instruction.
Flags
Flags values. These may be or'd together.
Wrapper class representing virtual and physical registers.
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
Represents one node in the SelectionDAG.
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation.
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
StringRef - Represent a constant reference to a string, i.e.
TargetLowering(const TargetLowering &)=delete
Primary interface to the complete machine description for the target machine.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
LoadExtType
LoadExtType enum - This enum defines the three variants of LOADEXT (load with extension).
This is an optimization pass for GlobalISel generic memory operations.
DWARFExpression::Operation Op
This struct is a compact representation of a valid (non-zero power of two) alignment.
This represents an addressing mode of: BaseGV + BaseOffs + BaseReg + Scale*ScaleReg + ScalableOffset*...
This structure contains all information that is necessary for lowering calls.