LLVM 22.0.0git
LoongArchISelLowering.h
Go to the documentation of this file.
1//=- LoongArchISelLowering.h - LoongArch DAG Lowering Interface -*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the interfaces that LoongArch uses to lower LLVM code into
10// a selection DAG.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIB_TARGET_LOONGARCH_LOONGARCHISELLOWERING_H
15#define LLVM_LIB_TARGET_LOONGARCH_LOONGARCHISELLOWERING_H
16
17#include "LoongArch.h"
21
22namespace llvm {
23class LoongArchSubtarget;
24namespace LoongArchISD {
25enum NodeType : unsigned {
27
28 // TODO: add more LoongArchISDs
36
37 // Select
39
40 // Branch
43
44 // 32-bit shifts, directly matching the semantics of the named LoongArch
45 // instructions.
49
52
53 // unsigned 32-bit integer division
58
59 // FPR<->GPR transfer operations
64
66
67 // Build and split F64 pair
70
71 // Bit counting operations
74
77
78 // Byte-swapping and bit-reversal
84
85 // Intrinsic operations start ============================================
92
93 // CRC check operations
102
104
105 // Write new value to CSR and return old value.
106 // Operand 0: A chain pointer.
107 // Operand 1: The new value to write.
108 // Operand 2: The address of the required CSR.
109 // Result 0: The old value of the CSR.
110 // Result 1: The new chain pointer.
112
113 // Similar to CSRWR but with a write mask.
114 // Operand 0: A chain pointer.
115 // Operand 1: The new value to write.
116 // Operand 2: The write mask.
117 // Operand 3: The address of the required CSR.
118 // Result 0: The old value of the CSR.
119 // Result 1: The new chain pointer.
121
122 // IOCSR access operations
131
132 // Read CPU configuration information operation
134
135 // Vector Shuffle
148
149 // Extended vector element extraction
152
153 // Vector comparisons
158
159 // Floating point approximate reciprocal operation
162
163 // Vector logicial left / right shift by immediate
166
167 // Vector byte logicial left / right shift
170
171 // Scalar load broadcast to vector
173
174 // Vector mask set by condition
183
184 // Vector Horizontal Addition with Widening‌
185 VHADDW
186
187 // Intrinsic operations end =============================================
189} // end namespace LoongArchISD
190
192 const LoongArchSubtarget &Subtarget;
193
194public:
195 explicit LoongArchTargetLowering(const TargetMachine &TM,
196 const LoongArchSubtarget &STI);
197
198 const LoongArchSubtarget &getSubtarget() const { return Subtarget; }
199
200 bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const override;
201
202 // Provide custom lowering hooks for some operations.
203 SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override;
205 SelectionDAG &DAG) const override;
206
207 SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const override;
208
209 // This method returns the name of a target specific DAG node.
210 const char *getTargetNodeName(unsigned Opcode) const override;
211
212 // Lower incoming arguments, copy physregs into vregs.
214 bool IsVarArg,
216 const SDLoc &DL, SelectionDAG &DAG,
217 SmallVectorImpl<SDValue> &InVals) const override;
219 bool IsVarArg,
221 LLVMContext &Context, const Type *RetTy) const override;
222 SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg,
224 const SmallVectorImpl<SDValue> &OutVals, const SDLoc &DL,
225 SelectionDAG &DAG) const override;
227 SmallVectorImpl<SDValue> &InVals) const override;
228 bool isCheapToSpeculateCttz(Type *Ty) const override;
229 bool isCheapToSpeculateCtlz(Type *Ty) const override;
230 bool hasAndNot(SDValue Y) const override;
232 shouldExpandAtomicRMWInIR(AtomicRMWInst *AI) const override;
233 void emitExpandAtomicRMW(AtomicRMWInst *AI) const override;
234
236 Value *AlignedAddr, Value *Incr,
237 Value *Mask, Value *ShiftAmt,
238 AtomicOrdering Ord) const override;
239
241 EVT VT) const override;
246 Value *AlignedAddr, Value *CmpVal,
247 Value *NewVal, Value *Mask,
248 AtomicOrdering Ord) const override;
249
250 bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallInst &I,
251 MachineFunction &MF,
252 unsigned Intrinsic) const override;
253
255 EVT VT) const override;
256
258 getExceptionPointerRegister(const Constant *PersonalityFn) const override;
259
261 getExceptionSelectorRegister(const Constant *PersonalityFn) const override;
262
263 bool isFsqrtCheap(SDValue Operand, SelectionDAG &DAG) const override {
264 return true;
265 }
266
268 int &RefinementSteps, bool &UseOneConstNR,
269 bool Reciprocal) const override;
270
272 int &RefinementSteps) const override;
273
275 return ISD::SIGN_EXTEND;
276 }
277
279
280 Register getRegisterByName(const char *RegName, LLT VT,
281 const MachineFunction &MF) const override;
282 bool mayBeEmittedAsTailCall(const CallInst *CI) const override;
283
284 bool decomposeMulByConstant(LLVMContext &Context, EVT VT,
285 SDValue C) const override;
286
287 bool isUsedByReturnOnly(SDNode *N, SDValue &Chain) const override;
288
289 bool isLegalAddressingMode(const DataLayout &DL, const AddrMode &AM, Type *Ty,
290 unsigned AS,
291 Instruction *I = nullptr) const override;
292
293 bool isLegalICmpImmediate(int64_t Imm) const override;
294 bool isLegalAddImmediate(int64_t Imm) const override;
295 bool isZExtFree(SDValue Val, EVT VT2) const override;
296 bool isSExtCheaperThanZExt(EVT SrcVT, EVT DstVT) const override;
297 bool signExtendConstant(const ConstantInt *CI) const override;
298
299 bool hasAndNotCompare(SDValue Y) const override;
300
301 bool convertSelectOfConstantsToMath(EVT VT) const override { return true; }
302
304 EVT VT, unsigned AddrSpace = 0, Align Alignment = Align(1),
306 unsigned *Fast = nullptr) const override;
307
308 bool isShuffleMaskLegal(ArrayRef<int> Mask, EVT VT) const override {
309 if (!VT.isSimple())
310 return false;
311
312 // Not for i1 vectors
313 if (VT.getSimpleVT().getScalarType() == MVT::i1)
314 return false;
315
316 return isTypeLegal(VT.getSimpleVT());
317 }
318 bool shouldConsiderGEPOffsetSplit() const override { return true; }
319 bool shouldSignExtendTypeInLibCall(Type *Ty, bool IsSigned) const override;
320 bool shouldExtendTypeInLibCall(EVT Type) const override;
321
322 bool shouldAlignPointerArgs(CallInst *CI, unsigned &MinSize,
323 Align &PrefAlign) const override;
324
325 bool isFPImmVLDILegal(const APFloat &Imm, EVT VT) const;
327
329 const APInt &DemandedElts,
330 KnownBits &Known,
331 TargetLoweringOpt &TLO,
332 unsigned Depth) const override;
333
334private:
335 /// Target-specific function used to lower LoongArch calling conventions.
336 typedef bool LoongArchCCAssignFn(const DataLayout &DL, LoongArchABI::ABI ABI,
337 unsigned ValNo, MVT ValVT,
338 CCValAssign::LocInfo LocInfo,
339 ISD::ArgFlagsTy ArgFlags, CCState &State,
340 bool IsRet, Type *OrigTy);
341
342 void analyzeInputArgs(MachineFunction &MF, CCState &CCInfo,
343 const SmallVectorImpl<ISD::InputArg> &Ins, bool IsRet,
344 LoongArchCCAssignFn Fn) const;
345 void analyzeOutputArgs(MachineFunction &MF, CCState &CCInfo,
347 bool IsRet, CallLoweringInfo *CLI,
348 LoongArchCCAssignFn Fn) const;
349
350 template <class NodeTy>
351 SDValue getAddr(NodeTy *N, SelectionDAG &DAG, CodeModel::Model M,
352 bool IsLocal = true) const;
353 SDValue getStaticTLSAddr(GlobalAddressSDNode *N, SelectionDAG &DAG,
354 unsigned Opc, bool UseGOT, bool Large = false) const;
355 SDValue getDynamicTLSAddr(GlobalAddressSDNode *N, SelectionDAG &DAG,
356 unsigned Opc, bool Large = false) const;
357 SDValue getTLSDescAddr(GlobalAddressSDNode *N, SelectionDAG &DAG,
358 unsigned Opc, bool Large = false) const;
359 SDValue lowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const;
360 SDValue lowerBlockAddress(SDValue Op, SelectionDAG &DAG) const;
361 SDValue lowerJumpTable(SDValue Op, SelectionDAG &DAG) const;
362 SDValue lowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const;
363 SDValue lowerShiftLeftParts(SDValue Op, SelectionDAG &DAG) const;
364 SDValue lowerShiftRightParts(SDValue Op, SelectionDAG &DAG, bool IsSRA) const;
365
367 EmitInstrWithCustomInserter(MachineInstr &MI,
368 MachineBasicBlock *BB) const override;
369 SDValue lowerATOMIC_FENCE(SDValue Op, SelectionDAG &DAG) const;
370 SDValue lowerConstantPool(SDValue Op, SelectionDAG &DAG) const;
371 SDValue lowerEH_DWARF_CFA(SDValue Op, SelectionDAG &DAG) const;
372 SDValue lowerFP_TO_SINT(SDValue Op, SelectionDAG &DAG) const;
373 SDValue lowerBITCAST(SDValue Op, SelectionDAG &DAG) const;
374 SDValue lowerUINT_TO_FP(SDValue Op, SelectionDAG &DAG) const;
375 SDValue lowerSINT_TO_FP(SDValue Op, SelectionDAG &DAG) const;
376 SDValue lowerVASTART(SDValue Op, SelectionDAG &DAG) const;
377 SDValue lowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const;
378 SDValue lowerINTRINSIC_W_CHAIN(SDValue Op, SelectionDAG &DAG) const;
379 SDValue lowerINTRINSIC_VOID(SDValue Op, SelectionDAG &DAG) const;
380 SDValue lowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const;
381 SDValue lowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const;
382 SDValue lowerWRITE_REGISTER(SDValue Op, SelectionDAG &DAG) const;
383 SDValue lowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const;
384 SDValue lowerINSERT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const;
385 SDValue lowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const;
386 SDValue lowerCONCAT_VECTORS(SDValue Op, SelectionDAG &DAG) const;
387 SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const;
388 SDValue lowerBITREVERSE(SDValue Op, SelectionDAG &DAG) const;
389 SDValue lowerSCALAR_TO_VECTOR(SDValue Op, SelectionDAG &DAG) const;
390 SDValue lowerPREFETCH(SDValue Op, SelectionDAG &DAG) const;
391 SDValue lowerSELECT(SDValue Op, SelectionDAG &DAG) const;
392 SDValue lowerBRCOND(SDValue Op, SelectionDAG &DAG) const;
393 SDValue lowerFP_TO_FP16(SDValue Op, SelectionDAG &DAG) const;
394 SDValue lowerFP16_TO_FP(SDValue Op, SelectionDAG &DAG) const;
395 SDValue lowerFP_TO_BF16(SDValue Op, SelectionDAG &DAG) const;
396 SDValue lowerBF16_TO_FP(SDValue Op, SelectionDAG &DAG) const;
397 SDValue lowerVECREDUCE_ADD(SDValue Op, SelectionDAG &DAG) const;
398
399 bool isFPImmLegal(const APFloat &Imm, EVT VT,
400 bool ForCodeSize) const override;
401
402 bool shouldInsertFencesForAtomic(const Instruction *I) const override;
403
404 ConstraintType getConstraintType(StringRef Constraint) const override;
405
407 getInlineAsmMemConstraint(StringRef ConstraintCode) const override;
408
409 std::pair<unsigned, const TargetRegisterClass *>
410 getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
411 StringRef Constraint, MVT VT) const override;
412
413 void LowerAsmOperandForConstraint(SDValue Op, StringRef Constraint,
414 std::vector<SDValue> &Ops,
415 SelectionDAG &DAG) const override;
416
417 bool isEligibleForTailCallOptimization(
418 CCState &CCInfo, CallLoweringInfo &CLI, MachineFunction &MF,
419 const SmallVectorImpl<CCValAssign> &ArgLocs) const;
420
421 bool softPromoteHalfType() const override { return true; }
422
423 bool
424 splitValueIntoRegisterParts(SelectionDAG &DAG, const SDLoc &DL, SDValue Val,
425 SDValue *Parts, unsigned NumParts, MVT PartVT,
426 std::optional<CallingConv::ID> CC) const override;
427
428 SDValue
429 joinRegisterPartsIntoValue(SelectionDAG &DAG, const SDLoc &DL,
430 const SDValue *Parts, unsigned NumParts,
431 MVT PartVT, EVT ValueVT,
432 std::optional<CallingConv::ID> CC) const override;
433
434 /// Return the register type for a given MVT, ensuring vectors are treated
435 /// as a series of gpr sized integers.
436 MVT getRegisterTypeForCallingConv(LLVMContext &Context, CallingConv::ID CC,
437 EVT VT) const override;
438
439 /// Return the number of registers for a given MVT, ensuring vectors are
440 /// treated as a series of gpr sized integers.
441 unsigned getNumRegistersForCallingConv(LLVMContext &Context,
443 EVT VT) const override;
444};
445
446} // end namespace llvm
447
448#endif // LLVM_LIB_TARGET_LOONGARCH_LOONGARCHISELLOWERING_H
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Function Alias Analysis Results
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
return RetTy
IRTranslator LLVM IR MI
#define RegName(no)
#define I(x, y, z)
Definition: MD5.cpp:58
Register const TargetRegisterInfo * TRI
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
This file describes how to lower LLVM code to machine code.
Class for arbitrary precision integers.
Definition: APInt.h:78
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
An instruction that atomically checks whether a specified value is in a memory location,...
Definition: Instructions.h:506
an instruction that atomically reads a memory location, combines it with another value,...
Definition: Instructions.h:709
CCState - This class holds information needed while lowering arguments and return values.
This class represents a function call, abstracting a target machine's calling convention.
This is the shared class of boolean and integer constants.
Definition: Constants.h:87
This is an important base class in LLVM.
Definition: Constant.h:43
This class represents an Operation in the Expression.
A parsed version of the target data layout string in and methods for querying it.
Definition: DataLayout.h:63
Common base class shared among various IRBuilders.
Definition: IRBuilder.h:114
This is an important class for using LLVM in a threaded context.
Definition: LLVMContext.h:68
bool isShuffleMaskLegal(ArrayRef< int > Mask, EVT VT) const override
Targets can use this to indicate that they only support some VECTOR_SHUFFLE operations,...
bool isUsedByReturnOnly(SDNode *N, SDValue &Chain) const override
Return true if result of the specified node is used by a return node only.
bool convertSelectOfConstantsToMath(EVT VT) const override
Return true if a select of constants (select Cond, C1, C2) should be transformed into simple math ops...
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...
const LoongArchSubtarget & getSubtarget() const
SDValue getSqrtEstimate(SDValue Operand, SelectionDAG &DAG, int Enabled, int &RefinementSteps, bool &UseOneConstNR, bool Reciprocal) const override
Hooks for building estimates in place of slower divisions and square roots.
bool isLegalICmpImmediate(int64_t Imm) const override
Return true if the specified immediate is legal icmp immediate, that is the target has icmp instructi...
TargetLowering::AtomicExpansionKind shouldExpandAtomicCmpXchgInIR(AtomicCmpXchgInst *CI) const override
Returns how the given atomic cmpxchg should be expanded by the IR-level AtomicExpand pass.
Value * emitMaskedAtomicCmpXchgIntrinsic(IRBuilderBase &Builder, AtomicCmpXchgInst *CI, Value *AlignedAddr, Value *CmpVal, Value *NewVal, Value *Mask, AtomicOrdering Ord) const override
Perform a masked cmpxchg using a target-specific intrinsic.
EVT getSetCCResultType(const DataLayout &DL, LLVMContext &Context, EVT VT) const override
Return the ValueType of the result of SETCC operations.
bool isFMAFasterThanFMulAndFAdd(const MachineFunction &MF, EVT VT) const override
Return true if an FMA operation is faster than a pair of fmul and fadd instructions.
SDValue LowerCall(TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const override
This hook must be implemented to lower calls into the specified DAG.
bool decomposeMulByConstant(LLVMContext &Context, EVT VT, SDValue C) const override
Return true if it is profitable to transform an integer multiplication-by-constant into simpler opera...
LegalizeTypeAction getPreferredVectorAction(MVT VT) const override
Return the preferred vector type legalization action.
bool isSExtCheaperThanZExt(EVT SrcVT, EVT DstVT) const override
Return true if sign-extension from FromTy to ToTy is cheaper than zero-extension.
TargetLowering::AtomicExpansionKind shouldExpandAtomicRMWInIR(AtomicRMWInst *AI) const override
Returns how the IR-level AtomicExpand pass should expand the given AtomicRMW, if at all.
bool allowsMisalignedMemoryAccesses(EVT VT, unsigned AddrSpace=0, Align Alignment=Align(1), MachineMemOperand::Flags Flags=MachineMemOperand::MONone, unsigned *Fast=nullptr) const override
Determine if the target supports unaligned memory accesses.
bool isCheapToSpeculateCtlz(Type *Ty) const override
Return true if it is cheap to speculate a call to intrinsic ctlz.
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...
bool shouldAlignPointerArgs(CallInst *CI, unsigned &MinSize, Align &PrefAlign) const override
Return true if the pointer arguments to CI should be aligned by aligning the object whose address is ...
Value * emitMaskedAtomicRMWIntrinsic(IRBuilderBase &Builder, AtomicRMWInst *AI, Value *AlignedAddr, Value *Incr, Value *Mask, Value *ShiftAmt, AtomicOrdering Ord) const override
Perform a masked atomicrmw using a target-specific intrinsic.
bool isZExtFree(SDValue Val, EVT VT2) const override
Return true if zero-extending the specific node Val to type VT2 is free (either because it's implicit...
Register getExceptionPointerRegister(const Constant *PersonalityFn) const override
If a physical register, this returns the register that receives the exception address on entry to an ...
bool signExtendConstant(const ConstantInt *CI) const override
Return true if this constant should be sign extended when promoting to a larger type.
ISD::NodeType getExtendForAtomicOps() const override
Returns how the platform's atomic operations are extended (ZERO_EXTEND, SIGN_EXTEND,...
const char * getTargetNodeName(unsigned Opcode) const override
This method returns the name of a target specific DAG node.
bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallInst &I, MachineFunction &MF, unsigned Intrinsic) const override
Given an intrinsic, checks if on the target the intrinsic will need to map to a MemIntrinsicNode (tou...
bool isLegalAddImmediate(int64_t Imm) const override
Return true if the specified immediate is legal add immediate, that is the target has add instruction...
bool isCheapToSpeculateCttz(Type *Ty) const override
Return true if it is cheap to speculate a call to intrinsic cttz.
bool isLegalAddressingMode(const DataLayout &DL, const AddrMode &AM, Type *Ty, unsigned AS, Instruction *I=nullptr) const override
Return true if the addressing mode represented by AM is legal for this target, for a load/store of th...
bool shouldSignExtendTypeInLibCall(Type *Ty, bool IsSigned) const override
Returns true if arguments should be sign-extended in lib calls.
bool isFPImmVLDILegal(const APFloat &Imm, EVT VT) const
bool shouldExtendTypeInLibCall(EVT Type) const override
Returns true if arguments should be extended in lib calls.
Register getRegisterByName(const char *RegName, LLT VT, const MachineFunction &MF) const override
Return the register ID of the name passed in.
bool hasAndNot(SDValue Y) const override
Return true if the target has a bitwise and-not operation: X = ~A & B This can be used to simplify se...
bool shouldConsiderGEPOffsetSplit() const override
bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const override
Return true if folding a constant offset with the given GlobalAddress is legal.
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...
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...
bool SimplifyDemandedBitsForTargetNode(SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, KnownBits &Known, TargetLoweringOpt &TLO, unsigned Depth) const override
Attempt to simplify any target nodes based on the demanded bits/elts, returning true on success.
void emitExpandAtomicRMW(AtomicRMWInst *AI) const override
Perform a atomicrmw expansion using a target-specific way.
ISD::NodeType getExtendForAtomicCmpSwapArg() const override
Returns how the platform's atomic compare and swap expects its comparison value to be extended (ZERO_...
bool isFsqrtCheap(SDValue Operand, SelectionDAG &DAG) const override
Return true if SQRT(X) shouldn't be replaced with X*RSQRT(X).
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,...
bool hasAndNotCompare(SDValue Y) const override
Return true if the target should transform: (X & Y) == Y —> (~X & Y) == 0 (X & Y) !...
SDValue getRecipEstimate(SDValue Operand, SelectionDAG &DAG, int Enabled, int &RefinementSteps) const override
Return a reciprocal estimate value for the input operand.
bool CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF, bool IsVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, LLVMContext &Context, const Type *RetTy) const override
This hook should be implemented to check whether the return values described by the Outs array can fi...
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 mayBeEmittedAsTailCall(const CallInst *CI) const override
Return true if the target may be able emit the call instruction as a tail call.
Machine Value Type.
MVT getScalarType() const
If this is a vector, return the element type, otherwise return this.
Representation of each machine instruction.
Definition: MachineInstr.h:72
Flags
Flags values. These may be or'd together.
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
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...
Definition: SelectionDAG.h:229
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:574
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
LegalizeTypeAction
This enum indicates whether a types are legal for a target, and if not, what action should be used to...
bool isTypeLegal(EVT VT) const
Return true if the target has native support for the specified value type.
AtomicExpansionKind
Enum that specifies what an atomic load/AtomicRMWInst is expanded to, if at all.
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:83
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
LLVM Value Representation.
Definition: Value.h:75
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
@ Fast
Attempts to make calls as fast as possible (e.g.
Definition: CallingConv.h:41
@ C
The default llvm calling convention, compatible with C.
Definition: CallingConv.h:34
NodeType
ISD::NodeType enum - This enum defines the target-independent operators for a SelectionDAG.
Definition: ISDOpcodes.h:41
@ BUILTIN_OP_END
BUILTIN_OP_END - This must be the last enum value in this list.
Definition: ISDOpcodes.h:1568
@ SIGN_EXTEND
Conversion operators.
Definition: ISDOpcodes.h:826
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
AtomicOrdering
Atomic ordering for LLVM's memory model.
#define N
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
Extended Value Type.
Definition: ValueTypes.h:35
bool isSimple() const
Test if the given EVT is simple (as opposed to being extended).
Definition: ValueTypes.h:137
MVT getSimpleVT() const
Return the SimpleValueType held in the specified simple EVT.
Definition: ValueTypes.h:311
This structure contains all information that is necessary for lowering calls.