Go to the documentation of this file.
14 #ifndef LLVM_LIB_TARGET_LOONGARCH_LOONGARCHISELLOWERING_H
15 #define LLVM_LIB_TARGET_LOONGARCH_LOONGARCHISELLOWERING_H
23 class LoongArchSubtarget;
24 struct LoongArchRegisterInfo;
25 namespace LoongArchISD {
105 unsigned ValNo,
MVT ValVT,
108 bool IsFixed,
bool IsReg,
Type *OrigTy);
112 LoongArchCCAssignFn Fn)
const;
115 bool IsRet, CallLoweringInfo *CLI,
116 LoongArchCCAssignFn Fn)
const;
132 bool ForCodeSize)
const override;
134 bool shouldInsertFencesForAtomic(
const Instruction *
I)
const override {
135 return isa<LoadInst>(
I) || isa<StoreInst>(
I);
141 #endif // LLVM_LIB_TARGET_LOONGARCH_LOONGARCHISELLOWERING_H
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...
Generic address nodes are lowered to some combination of target independent and machine specific ABI
This is an optimization pass for GlobalISel generic memory operations.
const char * getTargetNodeName(unsigned Opcode) const override
This method returns the name of a target specific DAG node.
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
A parsed version of the target data layout string in and methods for querying it.
CCState - This class holds information needed while lowering arguments and return values.
bool isCheapToSpeculateCttz() const override
Return true if it is cheap to speculate a call to intrinsic cttz.
Represents one node in the SelectionDAG.
The instances of the Type class are immutable: once they are created, they are never changed.
Function Alias Analysis Results
LoongArchTargetLowering(const TargetMachine &TM, const LoongArchSubtarget &STI)
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
void ReplaceNodeResults(SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const override
This callback is invoked when a node result type is illegal for the target, and the operation was reg...
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
SDValue LowerCall(TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const override
This hook must be implemented to lower calls into the specified DAG.
SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, const SDLoc &DL, SelectionDAG &DAG) const override
This hook must be implemented to lower outgoing return values, described by the Outs array,...
Representation of each machine instruction.
This is an important class for using LLVM in a threaded context.
SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, const SDLoc &DL, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const override
This hook must be implemented to lower the incoming (formal) arguments, described by the Ins array,...
bool isCheapToSpeculateCtlz() const override
Return true if it is cheap to speculate a call to intrinsic ctlz.
This structure contains all information that is necessary for lowering calls.
Primary interface to the complete machine description for the target machine.
SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const override
This method will be invoked for all target nodes and for any target-independent nodes that the target...
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
@ BUILTIN_OP_END
BUILTIN_OP_END - This must be the last enum value in this list.
bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const override
Return true if folding a constant offset with the given GlobalAddress is legal.
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation.
const LoongArchSubtarget & getSubtarget() const
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
const char LLVMTargetMachineRef TM
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB
bool CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF, bool IsVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, LLVMContext &Context) const override
This hook should be implemented to check whether the return values described by the Outs array can fi...