Go to the documentation of this file.
16 #define DEBUG_TYPE "aarch64-selectiondag-info"
31 if (bzeroName && (!SizeValue || SizeValue->
getZExtValue() > 256)) {
40 Args.push_back(Entry);
42 Args.push_back(Entry);
50 std::pair<SDValue, SDValue> CallResult = TLI.
LowerCallTo(CLI);
51 return CallResult.second;
63 unsigned ObjSizeScaled = ObjSize / 16;
67 int FI = cast<FrameIndexSDNode>(Ptr)->getIndex();
78 unsigned OffsetScaled = 0;
79 while (OffsetScaled < ObjSizeScaled) {
80 if (ObjSizeScaled - OffsetScaled >= 2) {
85 {Chain, TagSrc, AddrNode},
89 OutChains.push_back(St);
93 if (ObjSizeScaled - OffsetScaled > 0) {
98 {Chain, TagSrc, AddrNode},
102 OutChains.push_back(St);
113 uint64_t ObjSize = cast<ConstantSDNode>(
Size)->getZExtValue();
114 assert(ObjSize % 16 == 0);
120 bool UseSetTagRangeLoop =
122 if (!UseSetTagRangeLoop)
130 int FI = cast<FrameIndexSDNode>(
Addr)->getIndex();
132 Opcode = ZeroData ? AArch64::STZGloop : AArch64::STGloop;
134 Opcode = ZeroData ? AArch64::STZGloop_wback : AArch64::STGloop_wback;
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
static PointerType * getInt8PtrTy(LLVMContext &C, unsigned AS=0)
CallLoweringInfo & setChain(SDValue InChain)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
SDVTList getVTList(EVT VT)
Return an SDVTList that represents the list of values specified.
MachineMemOperand * getMachineMemOperand(MachinePointerInfo PtrInfo, MachineMemOperand::Flags f, uint64_t s, Align base_alignment, const AAMDNodes &AAInfo=AAMDNodes(), const MDNode *Ranges=nullptr, SyncScope::ID SSID=SyncScope::System, AtomicOrdering Ordering=AtomicOrdering::NotAtomic, AtomicOrdering FailureOrdering=AtomicOrdering::NotAtomic)
getMachineMemOperand - Allocate a new MachineMemOperand.
Represents one node in the SelectionDAG.
const char * getLibcallName(RTLIB::Libcall Call) const
Get the libcall routine name for the specified libcall.
SDValue getMemBasePlusOffset(SDValue Base, TypeSize Offset, const SDLoc &DL, const SDNodeFlags Flags=SDNodeFlags())
Returns sum of the base pointer and offset.
The instances of the Type class are immutable: once they are created, they are never changed.
A description of a memory reference used in the backend.
std::pair< SDValue, SDValue > LowerCallTo(CallLoweringInfo &CLI) const
This function lowers an abstract call to a function into an actual call.
LLVMContext * getContext() const
const AArch64TargetLowering * getTargetLowering() const override
SDValue getRegister(unsigned Reg, EVT VT)
static SDValue EmitUnrolledSetTag(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Ptr, uint64_t ObjSize, const MachineMemOperand *BaseMemOperand, bool ZeroData)
SDValue getTargetFrameIndex(int FI, EVT VT)
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
const TargetLowering & getTargetLoweringInfo() const
Clang compiles this i1 i64 store i64 i64 store i64 i64 store i64 i64 store i64 align Which gets codegen d xmm0 movaps rbp movaps rbp movaps rbp movaps rbp rbp rbp rbp rbp It would be better to have movq s of instead of the movaps s LLVM produces ret int
SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, Align Alignment, bool isVolatile, MachinePointerInfo DstPtrInfo) const override
Emit target-specific code that performs a memset.
CallLoweringInfo & setDebugLoc(const SDLoc &dl)
static TypeSize Fixed(ScalarTy MinVal)
SDValue getMemIntrinsicNode(unsigned Opcode, const SDLoc &dl, SDVTList VTList, ArrayRef< SDValue > Ops, EVT MemVT, MachinePointerInfo PtrInfo, Align Alignment, MachineMemOperand::Flags Flags=MachineMemOperand::MOLoad|MachineMemOperand::MOStore, uint64_t Size=0, const AAMDNodes &AAInfo=AAMDNodes())
Creates a MemIntrinsicNode that may produce a result and takes a list of operands.
This struct is a compact representation of a valid (non-zero power of two) alignment.
SDValue EmitTargetCodeForSetTag(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Op1, SDValue Op2, MachinePointerInfo DstPtrInfo, bool ZeroData) const override
CallLoweringInfo & setLibCallee(CallingConv::ID CC, Type *ResultType, SDValue Target, ArgListTy &&ArgsList)
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
This class contains a discriminated union of information about pointers in memory operands,...
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT, ArrayRef< SDUse > Ops)
Gets or creates the specified node.
This structure contains all information that is necessary for lowering calls.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
uint64_t getZExtValue() const
MachineSDNode * getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT)
These are used for target selectors to create a new node with specified return type(s),...
void setNodeMemRefs(MachineSDNode *N, ArrayRef< MachineMemOperand * > NewMemRefs)
Mutate the specified machine node's memory references to the provided list.
std::vector< ArgListEntry > ArgListTy
static const int kSetTagLoopThreshold
@ C
C - The default llvm calling convention, compatible with C.
CallLoweringInfo & setDiscardResult(bool Value=true)
const DataLayout & getDataLayout() const
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation.
@ MOStore
The memory access writes data.
static Type * getVoidTy(LLVMContext &C)
unsigned getOpcode() const
SDValue getTargetConstant(uint64_t Val, const SDLoc &DL, EVT VT, bool isOpaque=false)
MachineFunction & getMachineFunction() const
SDValue getExternalSymbol(const char *Sym, EVT VT)
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
MVT getPointerTy(const DataLayout &DL, uint32_t AS=0) const override
Return the pointer type for the given address space, defaults to the pointer type from the data layou...
@ TokenFactor
TokenFactor - This node takes multiple tokens as input and produces a single token result.