|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
References
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp 1013 DL = &DAG.getDataLayout();
1014 Context = DAG.getContext();
1016 SL->init(DAG.getTargetLoweringInfo(), TM, DAG.getDataLayout());
1016 SL->init(DAG.getTargetLoweringInfo(), TM, DAG.getDataLayout());
1036 return DAG.getRoot();
1040 DAG.setRoot(Root);
1046 SDValue Root = DAG.getTokenFactor(getCurSDLoc(), PendingLoads);
1048 DAG.setRoot(Root);
1053 SDValue Root = DAG.getRoot();
1071 Root = DAG.getNode(ISD::TokenFactor, getCurSDLoc(), MVT::Other,
1074 DAG.setRoot(Root);
1197 DAG.AddDbgValue(SDV, Val.getNode(), false);
1206 DAG.getConstantDbgValue(Variable, Expr, Undef, dl, DbgSDNodeOrder);
1207 DAG.AddDbgValue(SDV, nullptr, false);
1259 auto SDV = DAG.getConstantDbgValue(Var, Expr, Undef, DL, SDNodeOrder);
1260 DAG.AddDbgValue(SDV, nullptr, false);
1271 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
1275 SDV = DAG.getConstantDbgValue(Var, Expr, V, dl, SDNodeOrder);
1276 DAG.AddDbgValue(SDV, nullptr, false);
1286 DAG.getFrameIndexDbgValue(Var, Expr, SI->second,
1290 DAG.AddDbgValue(SDV, nullptr, false);
1304 DAG.AddDbgValue(SDV, N.getNode(), false);
1323 RegsForValue RFV(V->getContext(), TLI, DAG.getDataLayout(), Reg,
1344 SDV = DAG.getVRegDbgValue(Var, *FragmentExpr, RegAndSize.first,
1346 DAG.AddDbgValue(SDV, nullptr, false);
1350 SDV = DAG.getVRegDbgValue(Var, Expr, Reg, false, dl, SDNodeOrder);
1351 DAG.AddDbgValue(SDV, nullptr, false);
1377 RegsForValue RFV(*DAG.getContext(), DAG.getTargetLoweringInfo(),
1377 RegsForValue RFV(*DAG.getContext(), DAG.getTargetLoweringInfo(),
1378 DAG.getDataLayout(), InReg, Ty,
1380 SDValue Chain = DAG.getEntryNode();
1381 Result = RFV.getCopyFromRegs(DAG, FuncInfo, getCurSDLoc(), Chain, nullptr,
1441 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
1444 EVT VT = TLI.getValueType(DAG.getDataLayout(), V->getType(), true);
1447 return DAG.getConstant(*CI, getCurSDLoc(), VT);
1450 return DAG.getGlobalAddress(GV, getCurSDLoc(), VT);
1454 return DAG.getConstant(0, getCurSDLoc(),
1455 TLI.getPointerTy(DAG.getDataLayout(), AS));
1459 return DAG.getConstantFP(*CFP, getCurSDLoc(), VT);
1462 return DAG.getUNDEF(VT);
1484 return DAG.getMergeValues(Constants, getCurSDLoc());
1499 return DAG.getMergeValues(Ops, getCurSDLoc());
1500 return NodeMap[V] = DAG.getBuildVector(VT, getCurSDLoc(), Ops);
1508 ComputeValueVTs(TLI, DAG.getDataLayout(), C->getType(), ValueVTs);
1516 Constants[i] = DAG.getUNDEF(EltVT);
1518 Constants[i] = DAG.getConstantFP(0, getCurSDLoc(), EltVT);
1520 Constants[i] = DAG.getConstant(0, getCurSDLoc(), EltVT);
1523 return DAG.getMergeValues(Constants, getCurSDLoc());
1527 return DAG.getBlockAddress(BA, VT);
1541 TLI.getValueType(DAG.getDataLayout(), VecTy->getElementType());
1545 Op = DAG.getConstantFP(0, getCurSDLoc(), EltVT);
1547 Op = DAG.getConstant(0, getCurSDLoc(), EltVT);
1552 return NodeMap[V] = DAG.getBuildVector(VT, getCurSDLoc(), Ops);
1561 return DAG.getFrameIndex(SI->second,
1562 TLI.getFrameIndexTy(DAG.getDataLayout()));
1569 RegsForValue RFV(*DAG.getContext(), TLI, DAG.getDataLayout(), InReg,
1569 RegsForValue RFV(*DAG.getContext(), TLI, DAG.getDataLayout(), InReg,
1571 SDValue Chain = DAG.getEntryNode();
1572 return RFV.getCopyFromRegs(DAG, FuncInfo, getCurSDLoc(), Chain, nullptr, V);
1592 DAG.setRoot(DAG.getNode(ISD::CATCHPAD, getCurSDLoc(), MVT::Other,
1592 DAG.setRoot(DAG.getNode(ISD::CATCHPAD, getCurSDLoc(), MVT::Other,
1608 DAG.setRoot(DAG.getNode(ISD::BR, getCurSDLoc(), MVT::Other,
1608 DAG.setRoot(DAG.getNode(ISD::BR, getCurSDLoc(), MVT::Other,
1609 getControlRoot(), DAG.getBasicBlock(TargetMBB)));
1628 SDValue Ret = DAG.getNode(ISD::CATCHRET, getCurSDLoc(), MVT::Other,
1629 getControlRoot(), DAG.getBasicBlock(TargetMBB),
1630 DAG.getBasicBlock(SuccessorColorMBB));
1631 DAG.setRoot(Ret);
1756 DAG.getNode(ISD::CLEANUPRET, getCurSDLoc(), MVT::Other, getControlRoot());
1757 DAG.setRoot(Ret);
1765 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
1766 auto &DL = DAG.getDataLayout();
1793 DAG.getDataLayout().getAllocaAddrSpace()),
1796 SDValue RetPtr = DAG.getCopyFromReg(DAG.getEntryNode(), getCurSDLoc(),
1796 SDValue RetPtr = DAG.getCopyFromReg(DAG.getEntryNode(), getCurSDLoc(),
1810 SDValue Ptr = DAG.getObjectPtrOffset(getCurSDLoc(), RetPtr, Offsets[i]);
1814 Val = DAG.getPtrExtOrTrunc(Val, getCurSDLoc(), MemVTs[i]);
1815 Chains[i] = DAG.getStore(Chain, getCurSDLoc(), Val,
1817 Ptr, MachinePointerInfo::getUnknownStack(DAG.getMachineFunction()));
1820 Chain = DAG.getNode(ISD::TokenFactor, getCurSDLoc(),
1858 getCopyToParts(DAG, getCurSDLoc(),
1909 DAG.getRegister(SwiftError.getOrCreateVRegUseAt(
1914 bool isVarArg = DAG.getMachineFunction().getFunction().isVarArg();
1916 DAG.getMachineFunction().getFunction().getCallingConv();
1917 Chain = DAG.getTargetLoweringInfo().LowerReturn(
1918 Chain, CallConv, isVarArg, Outs, OutVals, getCurSDLoc(), DAG);
1925 DAG.setRoot(Chain);
2064 CaseBlock CB(Opc, Cond, ConstantInt::getTrue(*DAG.getContext()),
2118 MachineFunction &MF = DAG.getMachineFunction();
2235 DAG.setRoot(DAG.getNode(ISD::BR, getCurSDLoc(),
2235 DAG.setRoot(DAG.getNode(ISD::BR, getCurSDLoc(),
2237 DAG.getBasicBlock(Succ0MBB)));
2264 if (!DAG.getTargetLoweringInfo().isJumpExpensive() && BOp->hasOneUse() &&
2300 CaseBlock CB(ISD::SETEQ, CondVal, ConstantInt::getTrue(*DAG.getContext()),
2321 DAG.setRoot(DAG.getNode(ISD::BR, dl, MVT::Other, getControlRoot(),
2321 DAG.setRoot(DAG.getNode(ISD::BR, dl, MVT::Other, getControlRoot(),
2322 DAG.getBasicBlock(CB.TrueBB)));
2327 auto &TLI = DAG.getTargetLoweringInfo();
2328 EVT MemVT = TLI.getMemValueType(DAG.getDataLayout(), CB.CmpLHS->getType());
2334 if (CB.CmpRHS == ConstantInt::getTrue(*DAG.getContext()) &&
2337 else if (CB.CmpRHS == ConstantInt::getFalse(*DAG.getContext()) &&
2339 SDValue True = DAG.getConstant(1, dl, CondLHS.getValueType());
2340 Cond = DAG.getNode(ISD::XOR, dl, CondLHS.getValueType(), CondLHS, True);
2348 CondLHS = DAG.getPtrExtOrTrunc(CondLHS, getCurSDLoc(), MemVT);
2349 CondRHS = DAG.getPtrExtOrTrunc(CondRHS, getCurSDLoc(), MemVT);
2351 Cond = DAG.getSetCC(dl, MVT::i1, CondLHS, CondRHS, CB.CC);
2363 Cond = DAG.getSetCC(dl, MVT::i1, CmpOp, DAG.getConstant(High, dl, VT),
2363 Cond = DAG.getSetCC(dl, MVT::i1, CmpOp, DAG.getConstant(High, dl, VT),
2366 SDValue SUB = DAG.getNode(ISD::SUB, dl,
2367 VT, CmpOp, DAG.getConstant(Low, dl, VT));
2368 Cond = DAG.getSetCC(dl, MVT::i1, SUB,
2369 DAG.getConstant(High-Low, dl, VT), ISD::SETULE);
2385 SDValue True = DAG.getConstant(1, dl, Cond.getValueType());
2386 Cond = DAG.getNode(ISD::XOR, dl, Cond.getValueType(), Cond, True);
2389 SDValue BrCond = DAG.getNode(ISD::BRCOND, dl,
2391 DAG.getBasicBlock(CB.TrueBB));
2396 BrCond = DAG.getNode(ISD::BR, dl, MVT::Other, BrCond,
2397 DAG.getBasicBlock(CB.FalseBB));
2399 DAG.setRoot(BrCond);
2406 EVT PTy = DAG.getTargetLoweringInfo().getPointerTy(DAG.getDataLayout());
2406 EVT PTy = DAG.getTargetLoweringInfo().getPointerTy(DAG.getDataLayout());
2407 SDValue Index = DAG.getCopyFromReg(getControlRoot(), getCurSDLoc(),
2409 SDValue Table = DAG.getJumpTable(JT.JTI, PTy);
2410 SDValue BrJumpTable = DAG.getNode(ISD::BR_JT, getCurSDLoc(),
2413 DAG.setRoot(BrJumpTable);
2426 SDValue Sub = DAG.getNode(ISD::SUB, dl, VT, SwitchOp,
2427 DAG.getConstant(JTH.First, dl, VT));
2434 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
2435 SwitchOp = DAG.getZExtOrTrunc(Sub, dl, TLI.getPointerTy(DAG.getDataLayout()));
2435 SwitchOp = DAG.getZExtOrTrunc(Sub, dl, TLI.getPointerTy(DAG.getDataLayout()));
2438 FuncInfo.CreateReg(TLI.getPointerTy(DAG.getDataLayout()));
2439 SDValue CopyTo = DAG.getCopyToReg(getControlRoot(), dl,
2447 SDValue CMP = DAG.getSetCC(
2448 dl, TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(),
2448 dl, TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(),
2450 Sub, DAG.getConstant(JTH.Last - JTH.First, dl, VT), ISD::SETUGT);
2452 SDValue BrCond = DAG.getNode(ISD::BRCOND, dl,
2454 DAG.getBasicBlock(JT.Default));
2458 BrCond = DAG.getNode(ISD::BR, dl, MVT::Other, BrCond,
2459 DAG.getBasicBlock(JT.MBB));
2461 DAG.setRoot(BrCond);
2465 DAG.setRoot(DAG.getNode(ISD::BR, dl, MVT::Other, CopyTo,
2465 DAG.setRoot(DAG.getNode(ISD::BR, dl, MVT::Other, CopyTo,
2466 DAG.getBasicBlock(JT.MBB)));
2468 DAG.setRoot(CopyTo);
2506 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
2507 EVT PtrTy = TLI.getPointerTy(DAG.getDataLayout());
2508 EVT PtrMemTy = TLI.getPointerMemTy(DAG.getDataLayout());
2515 SDValue StackSlotPtr = DAG.getFrameIndex(FI, PtrTy);
2520 SDValue GuardVal = DAG.getLoad(
2521 PtrMemTy, dl, DAG.getEntryNode(), StackSlotPtr,
2522 MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), FI), Align,
2526 GuardVal = TLI.emitStackGuardXorFP(DAG, GuardVal, dl);
2544 TargetLowering::CallLoweringInfo CLI(DAG);
2546 .setChain(DAG.getEntryNode())
2551 DAG.setRoot(Result.second);
2557 SDValue Chain = DAG.getEntryNode();
2559 Guard = getLoadStackGuard(DAG, dl, Chain);
2564 Guard = DAG.getLoad(PtrMemTy, dl, Chain, GuardPtr,
2571 SDValue Sub = DAG.getNode(ISD::SUB, dl, VT, Guard, GuardVal);
2573 SDValue Cmp = DAG.getSetCC(dl, TLI.getSetCCResultType(DAG.getDataLayout(),
2573 SDValue Cmp = DAG.getSetCC(dl, TLI.getSetCCResultType(DAG.getDataLayout(),
2574 *DAG.getContext(),
2576 Sub, DAG.getConstant(0, dl, VT), ISD::SETNE);
2580 SDValue BrCond = DAG.getNode(ISD::BRCOND, dl,
2582 Cmp, DAG.getBasicBlock(SPD.getFailureMBB()));
2584 SDValue Br = DAG.getNode(ISD::BR, dl,
2586 DAG.getBasicBlock(SPD.getSuccessMBB()));
2588 DAG.setRoot(Br);
2601 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
2605 TLI.makeLibCall(DAG, RTLIB::STACKPROTECTOR_CHECK_FAIL, MVT::isVoid,
2611 Chain = DAG.getNode(ISD::TRAP, getCurSDLoc(), MVT::Other, Chain);
2613 DAG.setRoot(Chain);
2626 DAG.getNode(ISD::SUB, dl, VT, SwitchOp, DAG.getConstant(B.First, dl, VT));
2626 DAG.getNode(ISD::SUB, dl, VT, SwitchOp, DAG.getConstant(B.First, dl, VT));
2629 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
2644 VT = TLI.getPointerTy(DAG.getDataLayout());
2645 Sub = DAG.getZExtOrTrunc(Sub, dl, VT);
2650 SDValue CopyTo = DAG.getCopyToReg(getControlRoot(), dl, B.Reg, Sub);
2662 SDValue RangeCmp = DAG.getSetCC(dl,
2663 TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(),
2663 TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(),
2665 RangeSub, DAG.getConstant(B.Range, dl, RangeSub.getValueType()),
2668 Root = DAG.getNode(ISD::BRCOND, dl, MVT::Other, Root, RangeCmp,
2669 DAG.getBasicBlock(B.Default));
2674 Root = DAG.getNode(ISD::BR, dl, MVT::Other, Root, DAG.getBasicBlock(MBB));
2674 Root = DAG.getNode(ISD::BR, dl, MVT::Other, Root, DAG.getBasicBlock(MBB));
2676 DAG.setRoot(Root);
2688 SDValue ShiftOp = DAG.getCopyFromReg(getControlRoot(), dl, Reg, VT);
2691 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
2695 Cmp = DAG.getSetCC(
2696 dl, TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VT),
2696 dl, TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VT),
2697 ShiftOp, DAG.getConstant(countTrailingZeros(B.Mask), dl, VT),
2701 Cmp = DAG.getSetCC(
2702 dl, TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VT),
2702 dl, TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VT),
2703 ShiftOp, DAG.getConstant(countTrailingOnes(B.Mask), dl, VT),
2707 SDValue SwitchVal = DAG.getNode(ISD::SHL, dl, VT,
2708 DAG.getConstant(1, dl, VT), ShiftOp);
2711 SDValue AndOp = DAG.getNode(ISD::AND, dl,
2712 VT, SwitchVal, DAG.getConstant(B.Mask, dl, VT));
2713 Cmp = DAG.getSetCC(
2714 dl, TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VT),
2714 dl, TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VT),
2715 AndOp, DAG.getConstant(0, dl, VT), ISD::SETNE);
2727 SDValue BrAnd = DAG.getNode(ISD::BRCOND, dl,
2729 Cmp, DAG.getBasicBlock(B.TargetBB));
2733 BrAnd = DAG.getNode(ISD::BR, dl, MVT::Other, BrAnd,
2734 DAG.getBasicBlock(NextMBB));
2736 DAG.setRoot(BrAnd);
2778 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
2780 DAG.getTargetConstant(Intrinsic::wasm_rethrow_in_catch, getCurSDLoc(),
2781 TLI.getPointerTy(DAG.getDataLayout())));
2782 SDVTList VTs = DAG.getVTList(ArrayRef<EVT>({MVT::Other})); // outchain
2783 DAG.setRoot(DAG.getNode(ISD::INTRINSIC_VOID, getCurSDLoc(), VTs, Ops));
2783 DAG.setRoot(DAG.getNode(ISD::INTRINSIC_VOID, getCurSDLoc(), VTs, Ops));
2821 DAG.setRoot(DAG.getNode(ISD::BR, getCurSDLoc(), MVT::Other, getControlRoot(),
2821 DAG.setRoot(DAG.getNode(ISD::BR, getCurSDLoc(), MVT::Other, getControlRoot(),
2822 DAG.getBasicBlock(Return)));
2850 DAG.setRoot(DAG.getNode(ISD::BR, getCurSDLoc(),
2850 DAG.setRoot(DAG.getNode(ISD::BR, getCurSDLoc(),
2852 DAG.getBasicBlock(Return)));
2865 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
2880 ComputeValueVTs(TLI, DAG.getDataLayout(), LP.getType(), ValueVTs);
2887 Ops[0] = DAG.getZExtOrTrunc(
2888 DAG.getCopyFromReg(DAG.getEntryNode(), dl,
2888 DAG.getCopyFromReg(DAG.getEntryNode(), dl,
2890 TLI.getPointerTy(DAG.getDataLayout())),
2893 Ops[0] = DAG.getConstant(0, dl, TLI.getPointerTy(DAG.getDataLayout()));
2893 Ops[0] = DAG.getConstant(0, dl, TLI.getPointerTy(DAG.getDataLayout()));
2895 Ops[1] = DAG.getZExtOrTrunc(
2896 DAG.getCopyFromReg(DAG.getEntryNode(), dl,
2896 DAG.getCopyFromReg(DAG.getEntryNode(), dl,
2898 TLI.getPointerTy(DAG.getDataLayout())),
2902 SDValue Res = DAG.getNode(ISD::MERGE_VALUES, dl,
2903 DAG.getVTList(ValueVTs), Ops);
2936 DAG.setRoot(DAG.getNode(ISD::BRIND, getCurSDLoc(),
2936 DAG.setRoot(DAG.getNode(ISD::BRIND, getCurSDLoc(),
2942 if (!DAG.getTarget().Options.TrapUnreachable)
2946 if (DAG.getTarget().Options.NoTrapAfterNoreturn) {
2958 DAG.setRoot(DAG.getNode(ISD::TRAP, getCurSDLoc(), MVT::Other, DAG.getRoot()));
2958 DAG.setRoot(DAG.getNode(ISD::TRAP, getCurSDLoc(), MVT::Other, DAG.getRoot()));
2958 DAG.setRoot(DAG.getNode(ISD::TRAP, getCurSDLoc(), MVT::Other, DAG.getRoot()));
2967 setValue(&I, DAG.getNode(ISD::FNEG, getCurSDLoc(),
3106 SDValue UnNodeValue = DAG.getNode(Opcode, getCurSDLoc(), Op.getValueType(),
3127 SDValue BinNodeValue = DAG.getNode(Opcode, getCurSDLoc(), Op1.getValueType(),
3136 EVT ShiftTy = DAG.getTargetLoweringInfo().getShiftAmountTy(
3137 Op1.getValueType(), DAG.getDataLayout());
3147 Op2 = DAG.getNode(ISD::ZERO_EXTEND, DL, ShiftTy, Op2);
3154 Op2 = DAG.getNode(ISD::TRUNCATE, DL, ShiftTy, Op2);
3158 Op2 = DAG.getZExtOrTrunc(Op2, DL, MVT::i32);
3180 SDValue Res = DAG.getNode(Opcode, getCurSDLoc(), Op1.getValueType(), Op1, Op2,
3192 setValue(&I, DAG.getNode(ISD::SDIV, getCurSDLoc(), Op1.getValueType(), Op1,
3206 auto &TLI = DAG.getTargetLoweringInfo();
3208 TLI.getMemValueType(DAG.getDataLayout(), I.getOperand(0)->getType());
3214 Op1 = DAG.getPtrExtOrTrunc(Op1, getCurSDLoc(), MemVT);
3215 Op2 = DAG.getPtrExtOrTrunc(Op2, getCurSDLoc(), MemVT);
3218 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3218 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3220 setValue(&I, DAG.getSetCC(getCurSDLoc(), DestVT, Op1, Op2, Opcode));
3237 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3237 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3239 setValue(&I, DAG.getSetCC(getCurSDLoc(), DestVT, Op1, Op2, Condition));
3252 ComputeValueVTs(DAG.getTargetLoweringInfo(), DAG.getDataLayout(), I.getType(),
3252 ComputeValueVTs(DAG.getTargetLoweringInfo(), DAG.getDataLayout(), I.getType(),
3270 LLVMContext &Ctx = *DAG.getContext();
3271 auto &TLI = DAG.getTargetLoweringInfo();
3359 DAG.getNode(OpCode, getCurSDLoc(),
3368 Values[i] = DAG.getNode(
3374 setValue(&I, DAG.getNode(ISD::MERGE_VALUES, getCurSDLoc(),
3375 DAG.getVTList(ValueVTs), Values));
3381 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3381 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3383 setValue(&I, DAG.getNode(ISD::TRUNCATE, getCurSDLoc(), DestVT, N));
3390 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3390 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3392 setValue(&I, DAG.getNode(ISD::ZERO_EXTEND, getCurSDLoc(), DestVT, N));
3399 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3399 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3401 setValue(&I, DAG.getNode(ISD::SIGN_EXTEND, getCurSDLoc(), DestVT, N));
3408 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
3409 EVT DestVT = TLI.getValueType(DAG.getDataLayout(), I.getType());
3410 setValue(&I, DAG.getNode(ISD::FP_ROUND, dl, DestVT, N,
3411 DAG.getTargetConstant(
3412 0, dl, TLI.getPointerTy(DAG.getDataLayout()))));
3418 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3418 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3420 setValue(&I, DAG.getNode(ISD::FP_EXTEND, getCurSDLoc(), DestVT, N));
3426 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3426 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3428 setValue(&I, DAG.getNode(ISD::FP_TO_UINT, getCurSDLoc(), DestVT, N));
3434 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3434 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3436 setValue(&I, DAG.getNode(ISD::FP_TO_SINT, getCurSDLoc(), DestVT, N));
3442 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3442 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3444 setValue(&I, DAG.getNode(ISD::UINT_TO_FP, getCurSDLoc(), DestVT, N));
3450 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3450 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3452 setValue(&I, DAG.getNode(ISD::SINT_TO_FP, getCurSDLoc(), DestVT, N));
3459 auto &TLI = DAG.getTargetLoweringInfo();
3460 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3460 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3463 TLI.getMemValueType(DAG.getDataLayout(), I.getOperand(0)->getType());
3464 N = DAG.getPtrExtOrTrunc(N, getCurSDLoc(), PtrMemVT);
3465 N = DAG.getZExtOrTrunc(N, getCurSDLoc(), DestVT);
3473 auto &TLI = DAG.getTargetLoweringInfo();
3474 EVT DestVT = TLI.getValueType(DAG.getDataLayout(), I.getType());
3475 EVT PtrMemVT = TLI.getMemValueType(DAG.getDataLayout(), I.getType());
3476 N = DAG.getZExtOrTrunc(N, getCurSDLoc(), PtrMemVT);
3477 N = DAG.getPtrExtOrTrunc(N, getCurSDLoc(), DestVT);
3484 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3484 EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
3490 setValue(&I, DAG.getNode(ISD::BITCAST, dl,
3497 setValue(&I, DAG.getConstant(C->getValue(), dl, DestVT, /*isTarget=*/false,
3504 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
3507 EVT DestVT = TLI.getValueType(DAG.getDataLayout(), I.getType());
3513 N = DAG.getAddrSpaceCast(getCurSDLoc(), DestVT, N, SrcAS, DestAS);
3519 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
3522 SDValue InIdx = DAG.getSExtOrTrunc(getValue(I.getOperand(2)), getCurSDLoc(),
3523 TLI.getVectorIdxTy(DAG.getDataLayout()));
3524 setValue(&I, DAG.getNode(ISD::INSERT_VECTOR_ELT, getCurSDLoc(),
3525 TLI.getValueType(DAG.getDataLayout(), I.getType()),
3530 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
3532 SDValue InIdx = DAG.getSExtOrTrunc(getValue(I.getOperand(1)), getCurSDLoc(),
3533 TLI.getVectorIdxTy(DAG.getDataLayout()));
3534 setValue(&I, DAG.getNode(ISD::EXTRACT_VECTOR_ELT, getCurSDLoc(),
3535 TLI.getValueType(DAG.getDataLayout(), I.getType()),
3544 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
3545 EVT VT = TLI.getValueType(DAG.getDataLayout(), I.getType());
3551 SDValue FirstElt = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL,
3553 DAG.getConstant(0, DL,
3554 TLI.getVectorIdxTy(DAG.getDataLayout())));
3555 setValue(&I, DAG.getNode(ISD::SPLAT_VECTOR, DL, VT, FirstElt));
3569 setValue(&I, DAG.getVectorShuffle(VT, DL, Src1, Src2, Mask));
3607 ConcatOps.push_back(DAG.getUNDEF(SrcVT));
3613 setValue(&I, DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, ConcatOps));
3620 EVT PaddedVT = EVT::getVectorVT(*DAG.getContext(), VT.getScalarType(),
3624 SDValue UndefVal = DAG.getUNDEF(SrcVT);
3631 Src1 = DAG.getNode(ISD::CONCAT_VECTORS, DL, PaddedVT, MOps1);
3632 Src2 = DAG.getNode(ISD::CONCAT_VECTORS, DL, PaddedVT, MOps2);
3643 SDValue Result = DAG.getVectorShuffle(PaddedVT, DL, Src1, Src2, MappedOps);
3648 Result = DAG.getNode(
3650 DAG.getConstant(0, DL, TLI.getVectorIdxTy(DAG.getDataLayout())));
3650 DAG.getConstant(0, DL, TLI.getVectorIdxTy(DAG.getDataLayout())));
3684 setValue(&I, DAG.getUNDEF(VT)); // Vectors are not used.
3692 Src = DAG.getUNDEF(VT);
3694 Src = DAG.getNode(
3696 DAG.getConstant(StartIdx[Input], DL,
3697 TLI.getVectorIdxTy(DAG.getDataLayout())));
3710 setValue(&I, DAG.getVectorShuffle(VT, DL, Src1, Src2, MappedOps));
3719 EVT IdxVT = TLI.getVectorIdxTy(DAG.getDataLayout());
3725 Res = DAG.getUNDEF(EltVT);
3730 Res = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL,
3731 EltVT, Src, DAG.getConstant(Idx, DL, IdxVT));
3737 setValue(&I, DAG.getBuildVector(VT, DL, Ops));
3756 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
3758 ComputeValueVTs(TLI, DAG.getDataLayout(), AggTy, AggValueVTs);
3760 ComputeValueVTs(TLI, DAG.getDataLayout(), ValTy, ValValueVTs);
3768 setValue(&I, DAG.getUNDEF(MVT(MVT::Other)));
3776 Values[i] = IntoUndef ? DAG.getUNDEF(AggValueVTs[i]) :
3782 Values[i] = FromUndef ? DAG.getUNDEF(AggValueVTs[i]) :
3787 Values[i] = IntoUndef ? DAG.getUNDEF(AggValueVTs[i]) :
3790 setValue(&I, DAG.getNode(ISD::MERGE_VALUES, getCurSDLoc(),
3791 DAG.getVTList(AggValueVTs), Values));
3808 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
3810 ComputeValueVTs(TLI, DAG.getDataLayout(), ValTy, ValValueVTs);
3816 setValue(&I, DAG.getUNDEF(MVT(MVT::Other)));
3827 DAG.getUNDEF(Agg.getNode()->getValueType(Agg.getResNo() + i)) :
3830 setValue(&I, DAG.getNode(ISD::MERGE_VALUES, getCurSDLoc(),
3831 DAG.getVTList(ValValueVTs), Values));
3841 auto &TLI = DAG.getTargetLoweringInfo();
3842 MVT PtrTy = TLI.getPointerTy(DAG.getDataLayout(), AS);
3843 MVT PtrMemTy = TLI.getPointerMemTy(DAG.getDataLayout(), AS);
3851 LLVMContext &Context = *DAG.getContext();
3853 N = DAG.getSplatBuildVector(VT, dl, N);
3871 N = DAG.getNode(ISD::ADD, dl, N.getValueType(), N,
3872 DAG.getConstant(Offset, dl, N.getValueType()), Flags);
3875 unsigned IdxSize = DAG.getDataLayout().getIndexSizeInBits(AS);
3889 LLVMContext &Context = *DAG.getContext();
3891 DAG.getConstant(Offs, dl, EVT::getVectorVT(Context, IdxTy, VectorWidth)) :
3892 DAG.getConstant(Offs, dl, IdxTy);
3900 OffsVal = DAG.getSExtOrTrunc(OffsVal, dl, N.getValueType());
3902 N = DAG.getNode(ISD::ADD, dl, N.getValueType(), N, OffsVal, Flags);
3911 IdxN = DAG.getSplatBuildVector(VT, dl, IdxN);
3916 IdxN = DAG.getSExtOrTrunc(IdxN, dl, N.getValueType());
3923 IdxN = DAG.getNode(ISD::SHL, dl,
3925 DAG.getConstant(Amt, dl, IdxN.getValueType()));
3927 SDValue Scale = DAG.getConstant(ElementSize.getZExtValue(), dl,
3929 IdxN = DAG.getNode(ISD::MUL, dl,
3934 N = DAG.getNode(ISD::ADD, dl,
3940 N = DAG.getPtrExtendInReg(N, dl, PtrMemTy);
3953 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
3954 auto &DL = DAG.getDataLayout();
3961 EVT IntPtr = TLI.getPointerTy(DAG.getDataLayout(), DL.getAllocaAddrSpace());
3963 AllocSize = DAG.getZExtOrTrunc(AllocSize, dl, IntPtr);
3965 AllocSize = DAG.getNode(ISD::MUL, dl, IntPtr,
3967 DAG.getConstant(TySize, dl, IntPtr));
3973 DAG.getSubtarget().getFrameLowering()->getStackAlignment();
3982 AllocSize = DAG.getNode(ISD::ADD, dl, AllocSize.getValueType(), AllocSize,
3983 DAG.getConstant(StackAlign - 1, dl, IntPtr), Flags);
3987 DAG.getNode(ISD::AND, dl, AllocSize.getValueType(), AllocSize,
3988 DAG.getConstant(~(uint64_t)(StackAlign - 1), dl, IntPtr));
3990 SDValue Ops[] = {getRoot(), AllocSize, DAG.getConstant(Align, dl, IntPtr)};
3991 SDVTList VTs = DAG.getVTList(AllocSize.getValueType(), MVT::Other);
3992 SDValue DSA = DAG.getNode(ISD::DYNAMIC_STACKALLOC, dl, VTs, Ops);
3994 DAG.setRoot(DSA.getValue(1));
4003 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
4027 isDereferenceablePointer(SV, I.getType(), DAG.getDataLayout());
4036 ComputeValueVTs(TLI, DAG.getDataLayout(), Ty, ValueVTs, &MemVTs, &Offsets);
4049 LocationSize::precise(DAG.getDataLayout().getTypeStoreSize(Ty)),
4052 Root = DAG.getEntryNode();
4056 Root = DAG.getRoot();
4062 Root = TLI.prepareVolatileOrAtomicLoad(Root, dl, DAG);
4082 SDValue Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other,
4087 SDValue A = DAG.getNode(ISD::ADD, dl,
4089 DAG.getConstant(Offsets[i], dl, PtrVT),
4102 SDValue L = DAG.getLoad(MemVTs[i], dl, Root, A,
4108 L = DAG.getZExtOrTrunc(L, dl, ValueVTs[i]);
4114 SDValue Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other,
4117 DAG.setRoot(Chain);
4122 setValue(&I, DAG.getNode(ISD::MERGE_VALUES, dl,
4123 DAG.getVTList(ValueVTs), Values));
4127 assert(DAG.getTargetLoweringInfo().supportSwiftError() &&
4133 ComputeValueVTs(DAG.getTargetLoweringInfo(), DAG.getDataLayout(),
4133 ComputeValueVTs(DAG.getTargetLoweringInfo(), DAG.getDataLayout(),
4144 SDValue CopyNode = DAG.getCopyToReg(getRoot(), getCurSDLoc(), VReg,
4146 DAG.setRoot(CopyNode);
4150 assert(DAG.getTargetLoweringInfo().supportSwiftError() &&
4165 SV, LocationSize::precise(DAG.getDataLayout().getTypeStoreSize(Ty)),
4171 ComputeValueVTs(DAG.getTargetLoweringInfo(), DAG.getDataLayout(), Ty,
4171 ComputeValueVTs(DAG.getTargetLoweringInfo(), DAG.getDataLayout(), Ty,
4177 SDValue L = DAG.getCopyFromReg(
4191 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
4208 ComputeValueVTs(DAG.getTargetLoweringInfo(), DAG.getDataLayout(),
4208 ComputeValueVTs(DAG.getTargetLoweringInfo(), DAG.getDataLayout(),
4244 SDValue Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other,
4249 SDValue Add = DAG.getNode(ISD::ADD, dl, PtrVT, Ptr,
4250 DAG.getConstant(Offsets[i], dl, PtrVT), Flags);
4253 Val = DAG.getPtrExtOrTrunc(Val, dl, MemVTs[i]);
4255 DAG.getStore(Root, dl, Val, Add, MachinePointerInfo(PtrV, Offsets[i]),
4260 SDValue StoreNode = DAG.getNode(ISD::TokenFactor, dl, MVT::Other,
4262 DAG.setRoot(StoreNode);
4299 Alignment = DAG.getEVTAlignment(VT);
4305 DAG.getMachineFunction().
4309 SDValue StoreNode = DAG.getMaskedStore(getRoot(), sdl, Src0, Ptr, Mask, VT,
4312 DAG.setRoot(StoreNode);
4334 SelectionDAG& DAG = SDB->DAG;
4394 Alignment = DAG.getEVTAlignment(VT);
4395 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
4409 MachineMemOperand *MMO = DAG.getMachineFunction().
4414 Base = DAG.getConstant(0, sdl, TLI.getPointerTy(DAG.getDataLayout()));
4414 Base = DAG.getConstant(0, sdl, TLI.getPointerTy(DAG.getDataLayout()));
4417 Scale = DAG.getTargetConstant(1, sdl, TLI.getPointerTy(DAG.getDataLayout()));
4417 Scale = DAG.getTargetConstant(1, sdl, TLI.getPointerTy(DAG.getDataLayout()));
4420 SDValue Scatter = DAG.getMaskedScatter(DAG.getVTList(MVT::Other), VT, sdl,
4420 SDValue Scatter = DAG.getMaskedScatter(DAG.getVTList(MVT::Other), VT, sdl,
4422 DAG.setRoot(Scatter);
4459 Alignment = DAG.getEVTAlignment(VT);
4471 DAG.getDataLayout().getTypeStoreSize(I.getType())),
4475 SDValue InChain = AddToChain ? DAG.getRoot() : DAG.getEntryNode();
4475 SDValue InChain = AddToChain ? DAG.getRoot() : DAG.getEntryNode();
4478 DAG.getMachineFunction().
4483 SDValue Load = DAG.getMaskedLoad(VT, sdl, InChain, Ptr, Mask, Src0, VT, MMO,
4498 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
4499 EVT VT = TLI.getValueType(DAG.getDataLayout(), I.getType());
4502 Alignment = DAG.getEVTAlignment(VT);
4508 SDValue Root = DAG.getRoot();
4521 DAG.getDataLayout().getTypeStoreSize(I.getType())),
4524 Root = DAG.getEntryNode();
4529 DAG.getMachineFunction().
4535 Base = DAG.getConstant(0, sdl, TLI.getPointerTy(DAG.getDataLayout()));
4535 Base = DAG.getConstant(0, sdl, TLI.getPointerTy(DAG.getDataLayout()));
4538 Scale = DAG.getTargetConstant(1, sdl, TLI.getPointerTy(DAG.getDataLayout()));
4538 Scale = DAG.getTargetConstant(1, sdl, TLI.getPointerTy(DAG.getDataLayout()));
4541 SDValue Gather = DAG.getMaskedGather(DAG.getVTList(VT, MVT::Other), VT, sdl,
4541 SDValue Gather = DAG.getMaskedGather(DAG.getVTList(VT, MVT::Other), VT, sdl,
4559 SDVTList VTs = DAG.getVTList(MemVT, MVT::i1, MVT::Other);
4561 auto Alignment = DAG.getEVTAlignment(MemVT);
4566 Flags |= DAG.getTargetLoweringInfo().getMMOFlags(I);
4568 MachineFunction &MF = DAG.getMachineFunction();
4575 SDValue L = DAG.getAtomicCmpSwap(ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS,
4584 DAG.setRoot(OutChain);
4612 auto Alignment = DAG.getEVTAlignment(MemVT);
4617 Flags |= DAG.getTargetLoweringInfo().getMMOFlags(I);
4619 MachineFunction &MF = DAG.getMachineFunction();
4626 DAG.getAtomic(NT, dl, MemVT, InChain,
4633 DAG.setRoot(OutChain);
4638 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
4641 Ops[1] = DAG.getConstant((unsigned)I.getOrdering(), dl,
4642 TLI.getFenceOperandTy(DAG.getDataLayout()));
4643 Ops[2] = DAG.getConstant(I.getSyncScopeID(), dl,
4644 TLI.getFenceOperandTy(DAG.getDataLayout()));
4645 DAG.setRoot(DAG.getNode(ISD::ATOMIC_FENCE, dl, MVT::Other, Ops));
4645 DAG.setRoot(DAG.getNode(ISD::ATOMIC_FENCE, dl, MVT::Other, Ops));
4655 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
4656 EVT VT = TLI.getValueType(DAG.getDataLayout(), I.getType());
4657 EVT MemVT = TLI.getMemValueType(DAG.getDataLayout(), I.getType());
4669 DAG.getDataLayout()))
4675 DAG.getMachineFunction().
4679 DAG.getEVTAlignment(MemVT),
4682 InChain = TLI.prepareVolatileOrAtomicLoad(InChain, dl, DAG);
4689 SDValue L = DAG.getLoad(MemVT, dl, InChain, Ptr, MMO);
4691 L = DAG.getPtrExtOrTrunc(L, dl, VT);
4696 DAG.setRoot(OutChain);
4702 SDValue L = DAG.getAtomic(ISD::ATOMIC_LOAD, dl, MemVT, MemVT, InChain,
4707 L = DAG.getPtrExtOrTrunc(L, dl, VT);
4710 DAG.setRoot(OutChain);
4721 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
4723 TLI.getMemValueType(DAG.getDataLayout(), I.getValueOperand()->getType());
4733 MachineFunction &MF = DAG.getMachineFunction();
4741 Val = DAG.getPtrExtOrTrunc(Val, dl, MemVT);
4747 SDValue S = DAG.getStore(InChain, dl, Val, Ptr, MMO);
4748 DAG.setRoot(S);
4751 SDValue OutChain = DAG.getAtomic(ISD::ATOMIC_STORE, dl, MemVT, InChain,
4755 DAG.setRoot(OutChain);
4774 Ops.push_back(DAG.getRoot());
4782 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
4784 DAG.getMachineFunction(),
4790 Ops.push_back(DAG.getTargetConstant(Intrinsic, getCurSDLoc(),
4791 TLI.getPointerTy(DAG.getDataLayout())));
4806 Ops.push_back(DAG.getTargetConstant(*CI, SDLoc(), VT));
4809 DAG.getTargetConstantFP(*cast<ConstantFP>(Arg), SDLoc(), VT));
4814 ComputeValueVTs(TLI, DAG.getDataLayout(), I.getType(), ValueVTs);
4819 SDVTList VTs = DAG.getVTList(ValueVTs);
4827 Result = DAG.getMemIntrinsicNode(
4832 Result = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, getCurSDLoc(), VTs, Ops);
4834 Result = DAG.getNode(ISD::INTRINSIC_W_CHAIN, getCurSDLoc(), VTs, Ops);
4836 Result = DAG.getNode(ISD::INTRINSIC_VOID, getCurSDLoc(), VTs, Ops);
4844 DAG.setRoot(Chain);
4849 EVT VT = TLI.getValueType(DAG.getDataLayout(), PTy);
4850 Result = DAG.getNode(ISD::BITCAST, getCurSDLoc(), VT, Result);
4852 Result = lowerRangeToAssertZExt(DAG, I, Result);
5493 MachineFunction &MF = DAG.getMachineFunction();
5494 const TargetInstrInfo *TII = DAG.getSubtarget().getInstrInfo();
5553 const auto &TLI = DAG.getTargetLoweringInfo();
5554 RegsForValue RFV(V->getContext(), TLI, DAG.getDataLayout(), VMI->second,
5603 return DAG.getFrameIndexDbgValue(Variable, Expr, FISDN->getIndex(),
5606 return DAG.getDbgValue(Variable, Expr, N.getNode(), N.getResNo(),
5632 SDValue Callee = DAG.getExternalSymbol(
5634 DAG.getTargetLoweringInfo().getPointerTy(DAG.getDataLayout()));
5634 DAG.getTargetLoweringInfo().getPointerTy(DAG.getDataLayout()));
5641 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
5655 setValue(&I, DAG.getNode(ISD::RETURNADDR, sdl,
5656 TLI.getPointerTy(DAG.getDataLayout()),
5660 setValue(&I, DAG.getNode(ISD::ADDROFRETURNADDR, sdl,
5661 TLI.getPointerTy(DAG.getDataLayout())));
5664 setValue(&I, DAG.getNode(ISD::SPONENTRY, sdl,
5665 TLI.getFrameIndexTy(DAG.getDataLayout())));
5668 setValue(&I, DAG.getNode(ISD::FRAMEADDR, sdl,
5669 TLI.getFrameIndexTy(DAG.getDataLayout()),
5676 DAG.getMDNode(cast<MDNode>(cast<MetadataAsValue>(Reg)->getMetadata()));
5677 EVT VT = TLI.getValueType(DAG.getDataLayout(), I.getType());
5678 Res = DAG.getNode(ISD::READ_REGISTER, sdl,
5679 DAG.getVTList(VT, MVT::Other), Chain, RegName);
5681 DAG.setRoot(Res.getValue(1));
5689 DAG.getMDNode(cast<MDNode>(cast<MetadataAsValue>(Reg)->getMetadata()));
5690 DAG.setRoot(DAG.getNode(ISD::WRITE_REGISTER, sdl, MVT::Other, Chain,
5690 DAG.setRoot(DAG.getNode(ISD::WRITE_REGISTER, sdl, MVT::Other, Chain,
5710 bool isTC = I.isTailCall() && isInTailCallPosition(&I, DAG.getTarget());
5713 SDValue MC = DAG.getMemcpy(getRoot(), sdl, Op1, Op2, Op3, Align, isVol,
5728 bool isTC = I.isTailCall() && isInTailCallPosition(&I, DAG.getTarget());
5729 SDValue MS = DAG.getMemset(getRoot(), sdl, Op1, Op2, Op3, Align, isVol,
5744 bool isTC = I.isTailCall() && isInTailCallPosition(&I, DAG.getTarget());
5747 SDValue MM = DAG.getMemmove(getRoot(), sdl, Op1, Op2, Op3, Align, isVol,
5763 bool isTC = I.isTailCall() && isInTailCallPosition(&I, DAG.getTarget());
5764 SDValue MC = DAG.getAtomicMemcpy(getRoot(), sdl, Dst, DstAlign, Src,
5781 bool isTC = I.isTailCall() && isInTailCallPosition(&I, DAG.getTarget());
5782 SDValue MC = DAG.getAtomicMemmove(getRoot(), sdl, Dst, DstAlign, Src,
5798 bool isTC = I.isTailCall() && isInTailCallPosition(&I, DAG.getTarget());
5799 SDValue MC = DAG.getAtomicMemset(getRoot(), sdl, Dst, DstAlign, Val, Length,
5843 SDDbgValue *SDV = DAG.getFrameIndexDbgValue(
5845 DAG.AddDbgValue(SDV, getRoot().getNode(), isParameter);
5863 DAG.getFrameIndexDbgValue(Variable, Expression, FINode->getIndex(),
5871 SDV = DAG.getDbgValue(Variable, Expression, N.getNode(), N.getResNo(),
5874 DAG.AddDbgValue(SDV, N.getNode(), isParameter);
5891 SDV = DAG.getDbgLabel(Label, dl, SDNodeOrder);
5892 DAG.AddDbgLabel(SDV);
5922 unsigned TypeID = DAG.getMachineFunction().getTypeIDFor(GV);
5923 Res = DAG.getConstant(TypeID, sdl, MVT::i32);
5930 DAG.getMachineFunction().setCallsEHReturn(true);
5931 DAG.setRoot(DAG.getNode(ISD::EH_RETURN, sdl,
5931 DAG.setRoot(DAG.getNode(ISD::EH_RETURN, sdl,
5938 DAG.getMachineFunction().setCallsUnwindInit(true);
5941 setValue(&I, DAG.getNode(ISD::EH_DWARF_CFA, sdl,
5942 TLI.getPointerTy(DAG.getDataLayout()),
5946 MachineModuleInfo &MMI = DAG.getMachineFunction().getMMI();
5956 MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo();
5967 SDValue Op = DAG.getNode(ISD::EH_SJLJ_SETJMP, sdl,
5968 DAG.getVTList(MVT::i32, MVT::Other), Ops);
5970 DAG.setRoot(Op.getValue(1));
5974 DAG.setRoot(DAG.getNode(ISD::EH_SJLJ_LONGJMP, sdl, MVT::Other,
5974 DAG.setRoot(DAG.getNode(ISD::EH_SJLJ_LONGJMP, sdl, MVT::Other,
5978 DAG.setRoot(DAG.getNode(ISD::EH_SJLJ_SETUP_DISPATCH, sdl, MVT::Other,
5978 DAG.setRoot(DAG.getNode(ISD::EH_SJLJ_SETUP_DISPATCH, sdl, MVT::Other,
6001 getValue(I.getArgOperand(1)), DAG));
6004 setValue(&I, expandLog(sdl, getValue(I.getArgOperand(0)), DAG, TLI));
6007 setValue(&I, expandLog2(sdl, getValue(I.getArgOperand(0)), DAG, TLI));
6010 setValue(&I, expandLog10(sdl, getValue(I.getArgOperand(0)), DAG, TLI));
6013 setValue(&I, expandExp(sdl, getValue(I.getArgOperand(0)), DAG, TLI));
6016 setValue(&I, expandExp2(sdl, getValue(I.getArgOperand(0)), DAG, TLI));
6020 getValue(I.getArgOperand(1)), DAG, TLI));
6049 setValue(&I, DAG.getNode(Opcode, sdl,
6067 EVT RetVT = TLI.getValueType(DAG.getDataLayout(), I.getType());
6068 setValue(&I, DAG.getNode(Opcode, sdl, RetVT,
6073 setValue(&I, DAG.getNode(ISD::FMINNUM, sdl,
6079 setValue(&I, DAG.getNode(ISD::FMAXNUM, sdl,
6085 setValue(&I, DAG.getNode(ISD::FMINIMUM, sdl,
6091 setValue(&I, DAG.getNode(ISD::FMAXIMUM, sdl,
6097 setValue(&I, DAG.getNode(ISD::FCOPYSIGN, sdl,
6103 setValue(&I, DAG.getNode(ISD::FMA, sdl,
6144 EVT VT = TLI.getValueType(DAG.getDataLayout(), I.getType());
6147 setValue(&I, DAG.getNode(ISD::FMA, sdl,
6154 SDValue Mul = DAG.getNode(ISD::FMUL, sdl,
6158 SDValue Add = DAG.getNode(ISD::FADD, sdl,
6167 setValue(&I, DAG.getNode(ISD::BITCAST, sdl, MVT::i16,
6168 DAG.getNode(ISD::FP_ROUND, sdl, MVT::f16,
6170 DAG.getTargetConstant(0, sdl,
6174 setValue(&I, DAG.getNode(ISD::FP_EXTEND, sdl,
6175 TLI.getValueType(DAG.getDataLayout(), I.getType()),
6176 DAG.getNode(ISD::BITCAST, sdl, MVT::f16,
6181 DAG.setRoot(DAG.getNode(ISD::PCMARKER, sdl, MVT::Other, getRoot(), Tmp));
6181 DAG.setRoot(DAG.getNode(ISD::PCMARKER, sdl, MVT::Other, getRoot(), Tmp));
6186 Res = DAG.getNode(ISD::READCYCLECOUNTER, sdl,
6187 DAG.getVTList(MVT::i64, MVT::Other), Op);
6189 DAG.setRoot(Res.getValue(1));
6193 setValue(&I, DAG.getNode(ISD::BITREVERSE, sdl,
6198 setValue(&I, DAG.getNode(ISD::BSWAP, sdl,
6206 setValue(&I, DAG.getNode(CI->isZero() ? ISD::CTTZ : ISD::CTTZ_ZERO_UNDEF,
6214 setValue(&I, DAG.getNode(CI->isZero() ? ISD::CTLZ : ISD::CTLZ_ZERO_UNDEF,
6221 setValue(&I, DAG.getNode(ISD::CTPOP, sdl, Ty, Arg));
6231 SDValue BitWidthC = DAG.getConstant(VT.getScalarSizeInBits(), sdl, VT);
6232 SDValue Zero = DAG.getConstant(0, sdl, VT);
6233 SDValue ShAmt = DAG.getNode(ISD::UREM, sdl, VT, Z, BitWidthC);
6237 setValue(&I, DAG.getNode(FunnelOpcode, sdl, VT, X, Y, Z));
6247 setValue(&I, DAG.getNode(RotateOpcode, sdl, VT, X, Z));
6255 SDValue NegShAmt = DAG.getNode(ISD::SUB, sdl, VT, Zero, Z);
6256 setValue(&I, DAG.getNode(RotateOpcode, sdl, VT, X, NegShAmt));
6262 SDValue NegZ = DAG.getNode(ISD::SUB, sdl, VT, Zero, Z);
6263 SDValue NShAmt = DAG.getNode(ISD::UREM, sdl, VT, NegZ, BitWidthC);
6264 SDValue ShX = DAG.getNode(ISD::SHL, sdl, VT, X, IsFSHL ? ShAmt : NShAmt);
6265 SDValue ShY = DAG.getNode(ISD::SRL, sdl, VT, X, IsFSHL ? NShAmt : ShAmt);
6266 setValue(&I, DAG.getNode(ISD::OR, sdl, VT, ShX, ShY));
6272 SDValue InvShAmt = DAG.getNode(ISD::SUB, sdl, VT, BitWidthC, ShAmt);
6273 SDValue ShX = DAG.getNode(ISD::SHL, sdl, VT, X, IsFSHL ? ShAmt : InvShAmt);
6274 SDValue ShY = DAG.getNode(ISD::SRL, sdl, VT, Y, IsFSHL ? InvShAmt : ShAmt);
6275 SDValue Or = DAG.getNode(ISD::OR, sdl, VT, ShX, ShY);
6285 SDValue IsZeroShift = DAG.getSetCC(sdl, CCVT, ShAmt, Zero, ISD::SETEQ);
6286 setValue(&I, DAG.getSelect(sdl, VT, IsZeroShift, IsFSHL ? X : Y, Or));
6292 setValue(&I, DAG.getNode(ISD::SADDSAT, sdl, Op1.getValueType(), Op1, Op2));
6298 setValue(&I, DAG.getNode(ISD::UADDSAT, sdl, Op1.getValueType(), Op1, Op2));
6304 setValue(&I, DAG.getNode(ISD::SSUBSAT, sdl, Op1.getValueType(), Op1, Op2));
6310 setValue(&I, DAG.getNode(ISD::USUBSAT, sdl, Op1.getValueType(), Op1, Op2));
6318 setValue(&I, DAG.getNode(FixedPointIntrinsicToOpcode(Intrinsic), sdl,
6326 setValue(&I, DAG.getNode(ISD::SMULFIXSAT, sdl, Op1.getValueType(), Op1, Op2,
6334 setValue(&I, DAG.getNode(ISD::UMULFIXSAT, sdl, Op1.getValueType(), Op1, Op2,
6340 Res = DAG.getNode(
6342 DAG.getVTList(TLI.getPointerTy(DAG.getDataLayout()), MVT::Other), Op);
6342 DAG.getVTList(TLI.getPointerTy(DAG.getDataLayout()), MVT::Other), Op);
6344 DAG.setRoot(Res.getValue(1));
6349 DAG.setRoot(DAG.getNode(ISD::STACKRESTORE, sdl, MVT::Other, getRoot(), Res));
6349 DAG.setRoot(DAG.getNode(ISD::STACKRESTORE, sdl, MVT::Other, getRoot(), Res));
6353 EVT PtrTy = TLI.getPointerTy(DAG.getDataLayout());
6354 EVT ResTy = TLI.getValueType(DAG.getDataLayout(), I.getType());
6360 Res = DAG.getNode(ISD::GET_DYNAMIC_AREA_OFFSET, sdl, DAG.getVTList(ResTy),
6360 Res = DAG.getNode(ISD::GET_DYNAMIC_AREA_OFFSET, sdl, DAG.getVTList(ResTy),
6362 DAG.setRoot(Op);
6367 EVT PtrTy = TLI.getPointerTy(DAG.getDataLayout());
6368 MachineFunction &MF = DAG.getMachineFunction();
6372 Res = getLoadStackGuard(DAG, sdl, Chain);
6376 Res = DAG.getLoad(PtrTy, sdl, Chain, getValue(Global),
6381 Res = TLI.emitStackGuardXorFP(DAG, Res, sdl);
6382 DAG.setRoot(Chain);
6388 MachineFunction &MF = DAG.getMachineFunction();
6390 EVT PtrTy = TLI.getPointerTy(DAG.getDataLayout());
6394 Src = getLoadStackGuard(DAG, sdl, Chain);
6403 SDValue FIN = DAG.getFrameIndex(FI, PtrTy);
6406 Res = DAG.getStore(Chain, sdl, Src, FIN, MachinePointerInfo::getFixedStack(
6407 DAG.getMachineFunction(), FI),
6410 DAG.setRoot(Res);
6434 MachineFunction &MF = DAG.getMachineFunction();
6439 Res = DAG.getLabelNode(ISD::ANNOTATION_LABEL, sdl, getRoot(), Label);
6440 DAG.setRoot(Res);
6452 Ops[4] = DAG.getSrcValue(I.getArgOperand(0));
6453 Ops[5] = DAG.getSrcValue(F);
6455 Res = DAG.getNode(ISD::INIT_TRAMPOLINE, sdl, MVT::Other, Ops);
6457 DAG.setRoot(Res);
6461 setValue(&I, DAG.getNode(ISD::ADJUST_TRAMPOLINE, sdl,
6462 TLI.getPointerTy(DAG.getDataLayout()),
6466 assert(DAG.getMachineFunction().getFunction().hasGC() &&
6480 setValue(&I, DAG.getNode(ISD::FLT_ROUNDS_, sdl, MVT::i32));
6497 DAG.setRoot(DAG.getNode(Op, sdl,MVT::Other, getRoot()));
6497 DAG.setRoot(DAG.getNode(Op, sdl,MVT::Other, getRoot()));
6502 TargetLowering::CallLoweringInfo CLI(DAG);
6505 DAG.getExternalSymbol(TrapFuncName.data(),
6506 TLI.getPointerTy(DAG.getDataLayout())),
6510 DAG.setRoot(Result.second);
6539 SDVTList VTs = DAG.getVTList(ResultVT, OverflowVT);
6540 setValue(&I, DAG.getNode(Op, sdl, VTs, Op1, Op2));
6547 Ops[0] = DAG.getRoot();
6552 SDValue Result = DAG.getMemIntrinsicNode(ISD::PREFETCH, sdl,
6553 DAG.getVTList(MVT::Other), Ops,
6563 DAG.setRoot(Result);
6596 ObjectPtr, Offset, DAG.getDataLayout()) != LifetimeObject)
6598 Res = DAG.getLifetimeNode(IsStart, sdl, getRoot(), FrameIndex, ObjectSize,
6600 DAG.setRoot(Res);
6606 setValue(&I, DAG.getUNDEF(TLI.getPointerTy(DAG.getDataLayout())));
6606 setValue(&I, DAG.getUNDEF(TLI.getPointerTy(DAG.getDataLayout())));
6640 MachineFunction &MF = DAG.getMachineFunction();
6641 const TargetInstrInfo *TII = DAG.getSubtarget().getInstrInfo();
6667 MachineFunction &MF = DAG.getMachineFunction();
6668 MVT PtrVT = TLI.getPointerTy(DAG.getDataLayout(), 0);
6681 SDValue OffsetSym = DAG.getMCSymbol(FrameAllocSym, PtrVT);
6683 DAG.getNode(ISD::LOCAL_RECOVER, sdl, PtrVT, OffsetSym);
6688 SDValue Add = DAG.getNode(ISD::ADD, sdl, PtrVT, FPVal, OffsetVal);
6698 MVT PtrVT = TLI.getPointerTy(DAG.getDataLayout());
6702 DAG.getCopyFromReg(DAG.getEntryNode(), getCurSDLoc(), VReg, PtrVT);
6702 DAG.getCopyFromReg(DAG.getEntryNode(), getCurSDLoc(), VReg, PtrVT);
6704 N = DAG.getZExtOrTrunc(N, getCurSDLoc(), MVT::i32);
6712 const auto &Triple = DAG.getTarget().getTargetTriple();
6722 SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
6732 MachineSDNode *MN = DAG.getMachineNode(TargetOpcode::PATCHABLE_EVENT_CALL,
6735 DAG.setRoot(patchableNode);
6743 const auto &Triple = DAG.getTarget().getTargetTriple();
6756 SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
6767 MachineSDNode *MN = DAG.getMachineNode(
6770 DAG.setRoot(patchableNode);
6800 I.getArgOperand(1), Offset, DAG.getDataLayout()));
6804 Ops.push_back(DAG.getTargetGlobalAddress(Base, getCurSDLoc(), MVT::i64, 0));
6814 I.getArgOperand(Op), Offset, DAG.getDataLayout()));
6824 Targets.push_back({Offset, DAG.getTargetGlobalAddress(
6834 Ops.push_back(DAG.getTargetConstant(T.Offset, getCurSDLoc(), MVT::i32));
6838 Ops.push_back(DAG.getRoot()); // Chain
6839 SDValue N(DAG.getMachineNode(TargetOpcode::ICALL_BRANCH_FUNNEL,
6842 DAG.setRoot(N);
6856 const SelectionDAGTargetInfo &TSI = DAG.getSelectionDAGInfo();
6859 DAG, getCurSDLoc(), getRoot(), getValue(I.getArgOperand(0)),
6862 DAG.setRoot(Val);
6871 EVT(DAG.getTargetLoweringInfo().getPointerTy(DAG.getDataLayout()));
6871 EVT(DAG.getTargetLoweringInfo().getPointerTy(DAG.getDataLayout()));
6873 setValue(&I, DAG.getNode(ISD::AND, getCurSDLoc(), DestVT, Ptr,
6874 DAG.getZExtOrTrunc(Const, getCurSDLoc(), DestVT)));
6983 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
6986 ComputeValueVTs(TLI, DAG.getDataLayout(), FPI.getType(), ValueVTs);
6989 SDVTList VTs = DAG.getVTList(ValueVTs);
6992 Result = DAG.getNode(Opcode, sdl, VTs,
6994 DAG.getTargetConstant(0, sdl,
6995 TLI.getPointerTy(DAG.getDataLayout())) });
6997 Result = DAG.getNode(Opcode, sdl, VTs,
7000 Result = DAG.getNode(Opcode, sdl, VTs,
7005 Result = DAG.getNode(Opcode, sdl, VTs,
7018 DAG.setRoot(OutChain);
7026 MachineFunction &MF = DAG.getMachineFunction();
7049 DAG.setRoot(DAG.getEHLabel(getCurSDLoc(), getControlRoot(), BeginLabel));
7049 DAG.setRoot(DAG.getEHLabel(getCurSDLoc(), getControlRoot(), BeginLabel));
7053 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
7070 DAG.setRoot(Result.second);
7077 DAG.setRoot(DAG.getEHLabel(getCurSDLoc(), getRoot(), EndLabel));
7077 DAG.setRoot(DAG.getEHLabel(getCurSDLoc(), getRoot(), EndLabel));
7085 WinEHFuncInfo *EHInfo = DAG.getMachineFunction().getWinEHFuncInfo();
7099 auto &DL = DAG.getDataLayout();
7107 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
7136 Entry.Node = DAG.getRegister(
7163 if (isTailCall && !isInTailCallPosition(CS, DAG.getTarget()))
7171 TargetLowering::CallLoweringInfo CLI(DAG);
7181 Result.first = lowerRangeToAssertZExt(DAG, *Inst, Result.first);
7194 DAG.setRoot(CopyNode);
7224 Root = Builder.DAG.getEntryNode();
7228 Root = Builder.DAG.getRoot();
7232 SDValue LoadVal = Builder.DAG.getLoad(LoadVT, Builder.getCurSDLoc(), Root,
7246 EVT VT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
7246 EVT VT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
7249 Value = DAG.getSExtOrTrunc(Value, getCurSDLoc(), VT);
7251 Value = DAG.getZExtOrTrunc(Value, getCurSDLoc(), VT);
7265 EVT CallVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
7265 EVT CallVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
7267 setValue(&I, DAG.getConstant(0, getCurSDLoc(), CallVT));
7271 const SelectionDAGTargetInfo &TSI = DAG.getSelectionDAGInfo();
7273 DAG, getCurSDLoc(), DAG.getRoot(), getValue(LHS), getValue(RHS),
7273 DAG, getCurSDLoc(), DAG.getRoot(), getValue(LHS), getValue(RHS),
7291 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
7338 LoadL = DAG.getBitcast(CmpVT, LoadL);
7339 LoadR = DAG.getBitcast(CmpVT, LoadR);
7342 SDValue Cmp = DAG.getSetCC(getCurSDLoc(), MVT::i1, LoadL, LoadR, ISD::SETNE);
7357 const SelectionDAGTargetInfo &TSI = DAG.getSelectionDAGInfo();
7359 TSI.EmitTargetCodeForMemchr(DAG, getCurSDLoc(), DAG.getRoot(),
7359 TSI.EmitTargetCodeForMemchr(DAG, getCurSDLoc(), DAG.getRoot(),
7381 unsigned DstAlign = DAG.InferPtrAlignment(Dst);
7382 unsigned SrcAlign = DAG.InferPtrAlignment(Src);
7393 SDValue MC = DAG.getMemcpy(getRoot(), sdl, Dst, Src, Size, Align, isVol,
7399 DAG.setRoot(MC);
7402 Size = DAG.getSExtOrTrunc(Size, sdl, Dst.getValueType());
7405 SDValue DstPlusSize = DAG.getNode(ISD::ADD, sdl, Dst.getValueType(),
7419 const SelectionDAGTargetInfo &TSI = DAG.getSelectionDAGInfo();
7421 TSI.EmitTargetCodeForStrcpy(DAG, getCurSDLoc(), getRoot(),
7427 DAG.setRoot(Res.second);
7442 const SelectionDAGTargetInfo &TSI = DAG.getSelectionDAGInfo();
7444 TSI.EmitTargetCodeForStrcmp(DAG, getCurSDLoc(), DAG.getRoot(),
7444 TSI.EmitTargetCodeForStrcmp(DAG, getCurSDLoc(), DAG.getRoot(),
7465 const SelectionDAGTargetInfo &TSI = DAG.getSelectionDAGInfo();
7467 TSI.EmitTargetCodeForStrlen(DAG, getCurSDLoc(), DAG.getRoot(),
7467 TSI.EmitTargetCodeForStrlen(DAG, getCurSDLoc(), DAG.getRoot(),
7486 const SelectionDAGTargetInfo &TSI = DAG.getSelectionDAGInfo();
7488 TSI.EmitTargetCodeForStrnlen(DAG, getCurSDLoc(), DAG.getRoot(),
7488 TSI.EmitTargetCodeForStrnlen(DAG, getCurSDLoc(), DAG.getRoot(),
7512 setValue(&I, DAG.getNode(Opcode, getCurSDLoc(), Tmp.getValueType(), Tmp));
7530 setValue(&I, DAG.getNode(Opcode, getCurSDLoc(), VT, Tmp0, Tmp1));
7572 setValue(&I, DAG.getNode(ISD::FCOPYSIGN, getCurSDLoc(),
8047 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
8049 DAG.getDataLayout(), DAG.getSubtarget().getRegisterInfo(), CS);
8049 DAG.getDataLayout(), DAG.getSubtarget().getRegisterInfo(), CS);
8074 EVT VT = TLI.getValueType(DAG.getDataLayout(), BA->getType(), true);
8075 OpInfo.CallOperand = DAG.getTargetBlockAddress(BA, VT);
8077 OpInfo.CallOperand = DAG.getBasicBlock(FuncInfo.MBBMap[BB]);
8084 .getCallOperandValEVT(*DAG.getContext(), TLI, DAG.getDataLayout())
8084 .getCallOperandValEVT(*DAG.getContext(), TLI, DAG.getDataLayout())
8092 DAG.getDataLayout(), STy->getElementType(ResNo));
8096 TLI.getSimpleValueType(DAG.getDataLayout(), CS.getType());
8126 SDValue Flag, Chain = (HasSideEffect) ? getRoot() : DAG.getRoot();
8144 patchMatchingInput(OpInfo, Input, DAG);
8148 TLI.ComputeConstraintToUse(OpInfo, OpInfo.CallOperand, &DAG);
8163 Chain = getAddressForMemoryInput(Chain, getCurSDLoc(), OpInfo, DAG);
8177 AsmNodeOperands.push_back(DAG.getTargetExternalSymbol(
8178 IA->getAsmString().c_str(), TLI.getPointerTy(DAG.getDataLayout())));
8184 AsmNodeOperands.push_back(DAG.getMDNode(SrcLoc));
8188 AsmNodeOperands.push_back(DAG.getTargetConstant(
8189 ExtraInfo.get(), getCurSDLoc(), TLI.getPointerTy(DAG.getDataLayout())));
8199 GetRegistersForValue(DAG, getCurSDLoc(), OpInfo, RefOpInfo);
8215 AsmNodeOperands.push_back(DAG.getTargetConstant(OpFlags, getCurSDLoc(),
8239 false, 0, getCurSDLoc(), DAG, AsmNodeOperands);
8270 DAG.getMachineFunction().getRegInfo();
8283 MatchedRegs.getCopyToRegs(InOperandVal, DAG, dl, Chain, &Flag,
8287 DAG, AsmNodeOperands);
8299 AsmNodeOperands.push_back(DAG.getTargetConstant(
8300 OpFlag, getCurSDLoc(), TLI.getPointerTy(DAG.getDataLayout())));
8315 Ops, DAG);
8332 AsmNodeOperands.push_back(DAG.getTargetConstant(
8333 ResOpType, getCurSDLoc(), TLI.getPointerTy(DAG.getDataLayout())));
8341 TLI.getPointerTy(DAG.getDataLayout()) &&
8352 AsmNodeOperands.push_back(DAG.getTargetConstant(ResOpType,
8382 OpInfo.AssignedRegs.getCopyToRegs(InOperandVal, DAG, dl,
8386 dl, DAG, AsmNodeOperands);
8394 false, 0, getCurSDLoc(), DAG,
8405 Chain = DAG.getNode(ISDOpc, getCurSDLoc(),
8406 DAG.getVTList(MVT::Other, MVT::Glue), AsmNodeOperands);
8426 EVT ResultVT = TLI.getValueType(DAG.getDataLayout(), *CurResultType);
8440 V = DAG.getNode(ISD::BITCAST, getCurSDLoc(), ResultVT, V);
8446 V = DAG.getNode(ISD::TRUNCATE, getCurSDLoc(), ResultVT, V);
8465 DAG, FuncInfo, getCurSDLoc(), Chain, &Flag, CS.getInstruction());
8470 OpInfo, DAG);
8482 SDValue Store = DAG.getStore(Chain, getCurSDLoc(), Val, getValue(Ptr),
8504 SDValue V = DAG.getNode(ISD::MERGE_VALUES, getCurSDLoc(),
8505 DAG.getVTList(ResultVTs), ResultValues);
8511 Chain = DAG.getNode(ISD::TokenFactor, getCurSDLoc(), MVT::Other, OutChains);
8515 DAG.setRoot(Chain);
8520 LLVMContext &Ctx = *DAG.getContext();
8524 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
8526 ComputeValueVTs(TLI, DAG.getDataLayout(), CS->getType(), ValueVTs);
8533 Ops.push_back(DAG.getUNDEF(ValueVTs[i]));
8535 setValue(CS.getInstruction(), DAG.getMergeValues(Ops, getCurSDLoc()));
8539 DAG.setRoot(DAG.getNode(ISD::VASTART, getCurSDLoc(),
8539 DAG.setRoot(DAG.getNode(ISD::VASTART, getCurSDLoc(),
8542 DAG.getSrcValue(I.getArgOperand(0))));
8546 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
8547 const DataLayout &DL = DAG.getDataLayout();
8548 SDValue V = DAG.getVAArg(
8549 TLI.getMemValueType(DAG.getDataLayout(), I.getType()), getCurSDLoc(),
8550 getRoot(), getValue(I.getOperand(0)), DAG.getSrcValue(I.getOperand(0)),
8552 DAG.setRoot(V.getValue(1));
8555 V = DAG.getPtrExtOrTrunc(
8556 V, getCurSDLoc(), TLI.getValueType(DAG.getDataLayout(), I.getType()));
8561 DAG.setRoot(DAG.getNode(ISD::VAEND, getCurSDLoc(),
8561 DAG.setRoot(DAG.getNode(ISD::VAEND, getCurSDLoc(),
8564 DAG.getSrcValue(I.getArgOperand(0))));
8568 DAG.setRoot(DAG.getNode(ISD::VACOPY, getCurSDLoc(),
8568 DAG.setRoot(DAG.getNode(ISD::VACOPY, getCurSDLoc(),
8572 DAG.getSrcValue(I.getArgOperand(0)),
8573 DAG.getSrcValue(I.getArgOperand(1))));
8673 Builder.DAG.getTargetConstant(StackMaps::ConstantOp, DL, MVT::i64));
8675 Builder.DAG.getTargetConstant(C->getSExtValue(), DL, MVT::i64));
8677 const TargetLowering &TLI = Builder.DAG.getTargetLoweringInfo();
8678 Ops.push_back(Builder.DAG.getTargetFrameIndex(
8679 FI->getIndex(), TLI.getFrameIndexTy(Builder.DAG.getDataLayout())));
8697 NullPtr = DAG.getIntPtrConstant(0, DL, true);
8709 Chain = DAG.getCALLSEQ_START(getRoot(), 0, 0, DL);
8714 Ops.push_back(DAG.getTargetConstant(
8717 Ops.push_back(DAG.getTargetConstant(
8732 SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
8733 SDNode *SM = DAG.getMachineNode(TargetOpcode::STACKMAP, DL, NodeTys, Ops);
8737 Chain = DAG.getCALLSEQ_END(Chain, NullPtr, NullPtr, InFlag, DL);
8742 DAG.setRoot(Chain);
8766 Callee = DAG.getIntPtrConstant(ConstCallee->getZExtValue(), dl,
8769 Callee = DAG.getTargetGlobalAddress(SymbolicCallee->getGlobal(),
8786 IsAnyRegCC ? Type::getVoidTy(*DAG.getContext()) : CS->getType();
8788 TargetLowering::CallLoweringInfo CLI(DAG);
8809 Ops.push_back(DAG.getTargetConstant(
8812 Ops.push_back(DAG.getTargetConstant(
8824 Ops.push_back(DAG.getTargetConstant(NumCallRegArgs, dl, MVT::i32));
8827 Ops.push_back(DAG.getTargetConstant((unsigned)CC, dl, MVT::i32));
8859 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
8861 ComputeValueVTs(TLI, DAG.getDataLayout(), CS->getType(), ValueVTs);
8867 NodeTys = DAG.getVTList(ValueVTs);
8869 NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
8872 MachineSDNode *MN = DAG.getMachineNode(TargetOpcode::PATCHPOINT,
8890 DAG.ReplaceAllUsesOfValuesWith(From, To, 2);
8892 DAG.ReplaceAllUsesWith(Call, MN);
8893 DAG.DeleteNode(Call);
8901 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
8907 EVT VT = TLI.getValueType(DAG.getDataLayout(), I.getType());
8916 Res = DAG.getNode(ISD::FADD, dl, VT, Op1,
8917 DAG.getNode(ISD::VECREDUCE_FADD, dl, VT, Op2));
8919 Res = DAG.getNode(ISD::VECREDUCE_STRICT_FADD, dl, VT, Op1, Op2);
8923 Res = DAG.getNode(ISD::FMUL, dl, VT, Op1,
8924 DAG.getNode(ISD::VECREDUCE_FMUL, dl, VT, Op2));
8926 Res = DAG.getNode(ISD::VECREDUCE_STRICT_FMUL, dl, VT, Op1, Op2);
8929 Res = DAG.getNode(ISD::VECREDUCE_ADD, dl, VT, Op1);
8932 Res = DAG.getNode(ISD::VECREDUCE_MUL, dl, VT, Op1);
8935 Res = DAG.getNode(ISD::VECREDUCE_AND, dl, VT, Op1);
8938 Res = DAG.getNode(ISD::VECREDUCE_OR, dl, VT, Op1);
8941 Res = DAG.getNode(ISD::VECREDUCE_XOR, dl, VT, Op1);
8944 Res = DAG.getNode(ISD::VECREDUCE_SMAX, dl, VT, Op1);
8947 Res = DAG.getNode(ISD::VECREDUCE_SMIN, dl, VT, Op1);
8950 Res = DAG.getNode(ISD::VECREDUCE_UMAX, dl, VT, Op1);
8953 Res = DAG.getNode(ISD::VECREDUCE_UMIN, dl, VT, Op1);
8956 Res = DAG.getNode(ISD::VECREDUCE_FMAX, dl, VT, Op1);
8959 Res = DAG.getNode(ISD::VECREDUCE_FMIN, dl, VT, Op1);
9376 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
9380 RegsForValue RFV(V->getContext(), TLI, DAG.getDataLayout(), Reg, V->getType(),
9382 SDValue Chain = DAG.getEntryNode();
9388 RFV.getCopyToRegs(Op, DAG, getCurSDLoc(), Chain, nullptr, V, ExtendType);
9581 SelectionDAG &DAG = SDB->DAG;
9765 MachineFunction& MF = SDB->DAG.getMachineFunction();
9771 SDB->DAG.getCopyToReg(NewRoot, SDB->getCurSDLoc(), SRetReg, ArgValue);
9985 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
9986 ComputeValueVTs(TLI, DAG.getDataLayout(), PN.getType(), ValueVTs);
9989 unsigned NumRegisters = TLI.getNumRegisters(*DAG.getContext(), VT);
10037 DAG.setRoot(MaybeTC);
10078 SDValue Or = DAG.getNode(ISD::OR, DL, VT, CondLHS,
10079 DAG.getConstant(CommonBit, DL, VT));
10080 SDValue Cond = DAG.getSetCC(
10081 DL, MVT::i1, Or, DAG.getConstant(BigValue | SmallValue, DL, VT),
10098 DAG.getNode(ISD::BRCOND, DL, MVT::Other, getControlRoot(), Cond,
10099 DAG.getBasicBlock(Small.MBB));
10101 BrCond = DAG.getNode(ISD::BR, DL, MVT::Other, BrCond,
10102 DAG.getBasicBlock(DefaultMBB));
10104 DAG.setRoot(BrCond);
10526 DAG.setRoot(DAG.getNode(ISD::BR, getCurSDLoc(), MVT::Other,
10526 DAG.setRoot(DAG.getNode(ISD::BR, getCurSDLoc(), MVT::Other,
10527 getControlRoot(), DAG.getBasicBlock(DefaultMBB)));
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h 626 return DAG.getTargetLoweringInfo().getFrameIndexTy(DAG.getDataLayout());
626 return DAG.getTargetLoweringInfo().getFrameIndexTy(DAG.getDataLayout());
lib/CodeGen/SelectionDAG/StatepointLowering.cpp 67 Ops.push_back(Builder.DAG.getTargetConstant(StackMaps::ConstantOp, L,
69 Ops.push_back(Builder.DAG.getTargetConstant(Value, L, MVT::i64));
96 MachineFrameInfo &MFI = Builder.DAG.getMachineFunction().getFrameInfo();
118 return Builder.DAG.getFrameIndex(FI, ValueType);
125 SDValue SpillSlot = Builder.DAG.CreateStackTemporary(ValueType);
267 Builder.DAG.getTargetFrameIndex(*Index, Builder.getFrameIndexTy());
379 Loc = Builder.DAG.getTargetFrameIndex(Index, Builder.getFrameIndexTy());
386 MachineFrameInfo &MFI = Builder.DAG.getMachineFunction().getFrameInfo();
393 auto &MF = Builder.DAG.getMachineFunction();
399 Chain = Builder.DAG.getStore(Chain, Builder.getCurSDLoc(), Incoming, Loc,
437 Ops.push_back(Builder.DAG.getTargetFrameIndex(FI->getIndex(),
440 auto &MF = Builder.DAG.getMachineFunction();
466 Builder.DAG.setRoot(Chain);
557 Incoming = Builder.DAG.getFrameIndex(FI, Builder.getFrameIndexTy());
591 Ops.push_back(Builder.DAG.getTargetFrameIndex(FI->getIndex(),
594 auto &MF = Builder.DAG.getMachineFunction();
709 TSOps.push_back(DAG.getSrcValue(V));
716 SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
719 DAG.getNode(ISD::GC_TRANSITION_START, getCurSDLoc(), NodeTys, TSOps);
731 Ops.push_back(DAG.getTargetConstant(SI.ID, getCurSDLoc(), MVT::i64));
733 DAG.getTargetConstant(SI.NumPatchBytes, getCurSDLoc(), MVT::i32));
739 Ops.push_back(DAG.getTargetConstant(NumCallRegArgs, getCurSDLoc(), MVT::i32));
778 SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
781 DAG.getMachineNode(TargetOpcode::STATEPOINT, getCurSDLoc(), NodeTys, Ops);
782 DAG.setNodeMemRefs(StatepointMCNode, MemRefs);
800 TEOps.push_back(DAG.getSrcValue(V));
806 SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue);
809 DAG.getNode(ISD::GC_TRANSITION_END, getCurSDLoc(), NodeTys, TEOps);
815 DAG.ReplaceAllUsesWith(CallNode, SinkNode); // This may update Root
817 DAG.DeleteNode(CallNode);
857 const auto &TLI = DAG.getTargetLoweringInfo();
858 const auto &DL = DAG.getDataLayout();
861 ActualCallee = DAG.getConstant(0, getCurSDLoc(), TLI.getPointerTy(DL, AS));
866 StatepointLoweringInfo SI(DAG);
904 RegsForValue RFV(*DAG.getContext(), DAG.getTargetLoweringInfo(),
904 RegsForValue RFV(*DAG.getContext(), DAG.getTargetLoweringInfo(),
905 DAG.getDataLayout(), Reg, RetTy,
907 SDValue Chain = DAG.getEntryNode();
909 RFV.getCopyToRegs(ReturnValue, DAG, getCurSDLoc(), Chain, nullptr);
921 setValue(ISP.getInstruction(), DAG.getIntPtrConstant(-1, getCurSDLoc()));
928 StatepointLoweringInfo SI(DAG);
932 ForceVoidReturnTy ? Type::getVoidTy(*DAG.getContext()) : Call->getType(),
953 ReturnVal = lowerRangeToAssertZExt(DAG, *Call, ReturnVal);
1020 SDValue SpillSlot = DAG.getTargetFrameIndex(Index, getFrameIndexTy());
1027 auto &MF = DAG.getMachineFunction();
1035 auto LoadVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
1035 auto LoadVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(),
1038 SDValue SpillLoad = DAG.getLoad(LoadVT, getCurSDLoc(), Chain,
1041 DAG.setRoot(SpillLoad.getValue(1));
1048 const auto &TLI = DAG.getTargetLoweringInfo();
1049 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(RTLIB::DEOPTIMIZE),
1050 TLI.getPointerTy(DAG.getDataLayout()));
1064 if (DAG.getTarget().Options.TrapUnreachable)
1065 DAG.setRoot(
1066 DAG.getNode(ISD::TRAP, getCurSDLoc(), MVT::Other, DAG.getRoot()));
1066 DAG.getNode(ISD::TRAP, getCurSDLoc(), MVT::Other, DAG.getRoot()));