15#ifndef LLVM_LIB_TARGET_M68K_M68KISELLOWERING_H
16#define LLVM_LIB_TARGET_M68K_M68KISELLOWERING_H
58 EVT VT)
const override;
88 std::pair<unsigned, const TargetRegisterClass *>
94 std::vector<SDValue> &
Ops,
102 bool IsVarArg)
const;
125 unsigned GetAlignedArgumentStackSize(
unsigned StackSize,
137 SDValue getReturnAddressFrameIndex(SelectionDAG &DAG)
const;
141 SDValue EmitTailCallLoadRetAddr(SelectionDAG &DAG,
SDValue &OutRetAddr,
142 SDValue Chain,
bool IsTailCall,
int FPDiff,
143 const SDLoc &
DL)
const;
149 EVT PtrVT,
unsigned SlotSize,
int FPDiff,
150 const SDLoc &
DL)
const;
153 const SmallVectorImpl<ISD::InputArg> &ArgInfo,
154 const SDLoc &
DL, SelectionDAG &DAG,
155 const CCValAssign &VA, MachineFrameInfo &MFI,
156 unsigned ArgIdx)
const;
159 const SDLoc &
DL, SelectionDAG &DAG,
160 const CCValAssign &VA, ISD::ArgFlagsTy Flags)
const;
164 SelectionDAG &DAG)
const;
174 SDValue LowerGlobalAddress(
const GlobalValue *GV,
const SDLoc &
DL,
175 int64_t
Offset, SelectionDAG &DAG)
const;
180 SDValue LowerShiftRightParts(
SDValue Op, SelectionDAG &DAG,
bool IsSRA)
const;
186 const SmallVectorImpl<ISD::InputArg> &Ins,
187 const SDLoc &
DL, SelectionDAG &DAG,
188 SmallVectorImpl<SDValue> &InVals)
const;
195 const SmallVectorImpl<ISD::InputArg> &Ins,
196 const SDLoc &
DL, SelectionDAG &DAG,
197 SmallVectorImpl<SDValue> &InVals)
const override;
199 SDValue LowerCall(CallLoweringInfo &CLI,
200 SmallVectorImpl<SDValue> &InVals)
const override;
204 const SmallVectorImpl<ISD::OutputArg> &Outs,
205 LLVMContext &Context,
const Type *RetTy)
const override;
210 const SmallVectorImpl<ISD::OutputArg> &Outs,
211 const SmallVectorImpl<SDValue> &OutVals,
const SDLoc &
DL,
212 SelectionDAG &DAG)
const override;
214 SDValue LowerExternalSymbolCall(SelectionDAG &DAG, SDLoc loc,
216 ArgListTy &&ArgList)
const;
217 SDValue getTLSGetAddr(GlobalAddressSDNode *GA, SelectionDAG &DAG,
218 unsigned TargetFlags)
const;
219 SDValue getM68kReadTp(SDLoc Loc, SelectionDAG &DAG)
const;
221 SDValue LowerTLSGeneralDynamic(GlobalAddressSDNode *GA,
222 SelectionDAG &DAG)
const;
223 SDValue LowerTLSLocalDynamic(GlobalAddressSDNode *GA,
224 SelectionDAG &DAG)
const;
225 SDValue LowerTLSInitialExec(GlobalAddressSDNode *GA, SelectionDAG &DAG)
const;
226 SDValue LowerTLSLocalExec(GlobalAddressSDNode *GA, SelectionDAG &DAG)
const;
228 bool decomposeMulByConstant(LLVMContext &Context, EVT VT,
231 MachineBasicBlock *EmitLoweredSelect(MachineInstr &
I,
232 MachineBasicBlock *
MBB)
const;
233 MachineBasicBlock *EmitLoweredSegAlloca(MachineInstr &
MI,
234 MachineBasicBlock *BB)
const;
239 SelectionDAG &DAG)
const;
244 SelectionDAG &DAG)
const;
248 bool IsEligibleForTailCallOptimization(
250 bool IsCalleeStructRet,
bool IsCallerStructRet, Type *RetTy,
251 const SmallVectorImpl<ISD::OutputArg> &Outs,
252 const SmallVectorImpl<SDValue> &OutVals,
253 const SmallVectorImpl<ISD::InputArg> &Ins, SelectionDAG &DAG)
const;
255 SDValue PerformDAGCombine(SDNode *
N, DAGCombinerInfo &DCI)
const override;
static SDValue LowerBRCOND(SDValue Op, SelectionDAG &DAG)
static SDValue LowerXALUO(SDValue Op, SelectionDAG &DAG)
static SDValue LowerVASTART(SDValue Op, SelectionDAG &DAG)
static SDValue LowerSETCCCARRY(SDValue Op, SelectionDAG &DAG)
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
const AbstractManglingParser< Derived, Alloc >::OperatorInfo AbstractManglingParser< Derived, Alloc >::Ops[]
This file contains the entry points for global functions defined in the M68k target library,...
Register const TargetRegisterInfo * TRI
static void LowerMemOpCallTo(SelectionDAG &DAG, MachineFunction &MF, SDValue Chain, SDValue Arg, SDValue PtrOff, int SPDiff, unsigned ArgOffset, bool isPPC64, bool isTailCall, bool isVector, SmallVectorImpl< SDValue > &MemOpChains, SmallVectorImpl< TailCallArgumentInfo > &TailCallArguments, const SDLoc &dl)
LowerMemOpCallTo - Store the argument to the stack or remember it in case of tail calls.
static SDValue LowerDYNAMIC_STACKALLOC(SDValue Op, SelectionDAG &DAG, const SparcSubtarget *Subtarget)
This file describes how to lower LLVM code to machine code.
static SDValue EmitTailCallStoreRetAddr(SelectionDAG &DAG, MachineFunction &MF, SDValue Chain, SDValue RetAddrFrIdx, EVT PtrVT, unsigned SlotSize, int FPDiff, const SDLoc &dl)
Emit a store of the return address if tail call optimization is performed and it is required (FPDiff!...
static SDValue EmitTest(SDValue Op, X86::CondCode X86CC, const SDLoc &dl, SelectionDAG &DAG, const X86Subtarget &Subtarget)
Emit nodes that will be selected as "test Op0,Op0", or something equivalent.
static SDValue EmitCmp(SDValue Op0, SDValue Op1, X86::CondCode X86CC, const SDLoc &dl, SelectionDAG &DAG, const X86Subtarget &Subtarget)
Emit nodes that will be selected as "cmp Op0,Op1", or something equivalent.
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...
an instruction that atomically reads a memory location, combines it with another value,...
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.
ConstraintType getConstraintType(StringRef ConstraintStr) const override
Given a constraint, return the type of constraint it is for this target.
void LowerAsmOperandForConstraint(SDValue Op, StringRef Constraint, std::vector< SDValue > &Ops, SelectionDAG &DAG) const override
Lower the specified operand into the Ops vector.
MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr &MI, MachineBasicBlock *MBB) const override
This method should be implemented by targets that mark instructions with the 'usesCustomInserter' fla...
virtual MVT getScalarShiftAmountTy(const DataLayout &, EVT) const override
EVT is not used in-tree, but is used by out-of-tree target.
const MCExpr * LowerCustomJumpTableEntry(const MachineJumpTableInfo *MJTI, const MachineBasicBlock *MBB, unsigned uid, MCContext &Ctx) const override
SDValue getPICJumpTableRelocBase(SDValue Table, SelectionDAG &DAG) const override
Returns relocation base for the given PIC jumptable.
const MCExpr * getPICJumpTableRelocBaseExpr(const MachineFunction *MF, unsigned JTI, MCContext &Ctx) const override
This returns the relocation base for the given PIC jumptable, the same as getPICJumpTableRelocBase,...
bool convertSelectOfConstantsToMath(EVT VT) const override
Return true if a select of constants (select Cond, C1, C2) should be transformed into simple math ops...
AtomicExpansionKind shouldExpandAtomicRMWInIR(AtomicRMWInst *RMW) const override
Returns how the IR-level AtomicExpand pass should expand the given AtomicRMW, if at all.
Register getExceptionPointerRegister(const Constant *PersonalityFn) const override
If a physical register, this returns the register that receives the exception address on entry to an ...
CCAssignFn * getCCAssignFn(CallingConv::ID CC, bool Return, bool IsVarArg) const
static const M68kTargetLowering * create(const M68kTargetMachine &TM, const M68kSubtarget &STI)
M68kTargetLowering(const M68kTargetMachine &TM, const M68kSubtarget &STI)
InlineAsm::ConstraintCode getInlineAsmMemConstraint(StringRef ConstraintCode) const override
SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override
Provide custom lowering hooks for some operations.
EVT getSetCCResultType(const DataLayout &DL, LLVMContext &Context, EVT VT) const override
Return the value type to use for ISD::SETCC.
unsigned getJumpTableEncoding() const override
Return the entry encoding for a jump table in the current function.
std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const override
Given a physical register constraint (e.g.
Register getExceptionSelectorRegister(const Constant *PersonalityFn) const override
If a physical register, this returns the register that receives the exception typeid on entry to a la...
Context object for machine code objects.
Base class for the full range of assembler expressions which are needed for parsing.
Representation of each machine instruction.
Wrapper class representing virtual and physical registers.
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...
StringRef - Represent a constant reference to a string, i.e.
AtomicExpansionKind
Enum that specifies what an atomic load/AtomicRMWInst is expanded to, if at all.
TargetLowering(const TargetLowering &)=delete
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.
CondCode
ISD::CondCode enum - These are ordered carefully to make the bitfields below work out,...
Define some predicates that are used for node matching.
bool isCalleePop(CallingConv::ID CallingConv, bool IsVarArg, bool GuaranteeTCO)
Determines whether the callee is required to pop its own arguments.
This is an optimization pass for GlobalISel generic memory operations.
bool CCAssignFn(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, Type *OrigTy, CCState &State)
CCAssignFn - This function assigns a location for Val, updating State to reflect the change.
@ And
Bitwise or logical AND of integers.
DWARFExpression::Operation Op