blob: 0961901c5f6172feba47f749896c1fb910d9566f [file] [log] [blame]
Eric Christopher50880d02010-09-18 18:52:28 +00001//===-- PTXISelLowering.cpp - PTX DAG Lowering Implementation -------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file implements the PTXTargetLowering class.
11//
12//===----------------------------------------------------------------------===//
13
Che-Liang Chioub48f2c22010-10-19 13:14:40 +000014#include "PTX.h"
Eric Christopher50880d02010-09-18 18:52:28 +000015#include "PTXISelLowering.h"
Che-Liang Chiou3278c422010-11-08 03:00:52 +000016#include "PTXMachineFunctionInfo.h"
Eric Christopher50880d02010-09-18 18:52:28 +000017#include "PTXRegisterInfo.h"
Justin Holewinski67a91842011-06-23 18:10:03 +000018#include "PTXSubtarget.h"
Eric Christopher50880d02010-09-18 18:52:28 +000019#include "llvm/Support/ErrorHandling.h"
Justin Holewinskie0aef2d2011-06-16 17:50:00 +000020#include "llvm/CodeGen/CallingConvLower.h"
Che-Liang Chioub48f2c22010-10-19 13:14:40 +000021#include "llvm/CodeGen/MachineFunction.h"
22#include "llvm/CodeGen/MachineRegisterInfo.h"
Eric Christopher50880d02010-09-18 18:52:28 +000023#include "llvm/CodeGen/SelectionDAG.h"
24#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
Justin Holewinski4bdd4ed2011-08-09 17:36:31 +000025#include "llvm/Support/Debug.h"
Che-Liang Chioufd8978b2011-03-02 03:20:28 +000026#include "llvm/Support/raw_ostream.h"
Eric Christopher50880d02010-09-18 18:52:28 +000027
28using namespace llvm;
29
Justin Holewinskie0aef2d2011-06-16 17:50:00 +000030//===----------------------------------------------------------------------===//
31// Calling Convention Implementation
32//===----------------------------------------------------------------------===//
33
34#include "PTXGenCallingConv.inc"
35
36//===----------------------------------------------------------------------===//
37// TargetLowering Implementation
38//===----------------------------------------------------------------------===//
39
Eric Christopher50880d02010-09-18 18:52:28 +000040PTXTargetLowering::PTXTargetLowering(TargetMachine &TM)
41 : TargetLowering(TM, new TargetLoweringObjectFileELF()) {
42 // Set up the register classes.
Justin Holewinski1b91bcd2011-06-16 17:49:58 +000043 addRegisterClass(MVT::i1, PTX::RegPredRegisterClass);
44 addRegisterClass(MVT::i16, PTX::RegI16RegisterClass);
45 addRegisterClass(MVT::i32, PTX::RegI32RegisterClass);
46 addRegisterClass(MVT::i64, PTX::RegI64RegisterClass);
47 addRegisterClass(MVT::f32, PTX::RegF32RegisterClass);
48 addRegisterClass(MVT::f64, PTX::RegF64RegisterClass);
Che-Liang Chioufd8978b2011-03-02 03:20:28 +000049
Justin Holewinski4fea05a2011-04-28 00:19:52 +000050 setBooleanContents(ZeroOrOneBooleanContent);
Dan Bailey84149462011-06-25 18:16:28 +000051 setMinFunctionAlignment(2);
Dan Baileyb05a8a82011-06-24 19:27:10 +000052
Dan Bailey84149462011-06-25 18:16:28 +000053 ////////////////////////////////////
54 /////////// Expansion //////////////
55 ////////////////////////////////////
Dan Baileyb05a8a82011-06-24 19:27:10 +000056
Dan Bailey84149462011-06-25 18:16:28 +000057 // (any/zero/sign) extload => load + (any/zero/sign) extend
Dan Baileyb05a8a82011-06-24 19:27:10 +000058
Justin Holewinski4fea05a2011-04-28 00:19:52 +000059 setLoadExtAction(ISD::EXTLOAD, MVT::i16, Expand);
60 setLoadExtAction(ISD::ZEXTLOAD, MVT::i16, Expand);
Dan Baileyb05a8a82011-06-24 19:27:10 +000061 setLoadExtAction(ISD::SEXTLOAD, MVT::i16, Expand);
Dan Bailey84149462011-06-25 18:16:28 +000062
63 // f32 extload => load + fextend
64
65 setLoadExtAction(ISD::EXTLOAD, MVT::f32, Expand);
66
67 // f64 truncstore => trunc + store
68
69 setTruncStoreAction(MVT::f64, MVT::f32, Expand);
70
71 // sign_extend_inreg => sign_extend
72
73 setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i1, Expand);
74
75 // br_cc => brcond
76
Che-Liang Chiou88d33672011-03-18 11:08:52 +000077 setOperationAction(ISD::BR_CC, MVT::Other, Expand);
78
Dan Bailey84149462011-06-25 18:16:28 +000079 // select_cc => setcc
80
Justin Holewinski2d525c52011-04-28 00:19:56 +000081 setOperationAction(ISD::SELECT_CC, MVT::Other, Expand);
82 setOperationAction(ISD::SELECT_CC, MVT::f32, Expand);
83 setOperationAction(ISD::SELECT_CC, MVT::f64, Expand);
Dan Bailey84149462011-06-25 18:16:28 +000084
85 ////////////////////////////////////
86 //////////// Legal /////////////////
87 ////////////////////////////////////
88
89 setOperationAction(ISD::ConstantFP, MVT::f32, Legal);
90 setOperationAction(ISD::ConstantFP, MVT::f64, Legal);
91
92 ////////////////////////////////////
93 //////////// Custom ////////////////
94 ////////////////////////////////////
95
96 // customise setcc to use bitwise logic if possible
97
Justin Holewinski2d525c52011-04-28 00:19:56 +000098 setOperationAction(ISD::SETCC, MVT::i1, Custom);
Eli Friedmanfc5d3052011-05-06 20:34:06 +000099
Dan Bailey84149462011-06-25 18:16:28 +0000100 // customize translation of memory addresses
101
102 setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
103 setOperationAction(ISD::GlobalAddress, MVT::i64, Custom);
Eli Friedmanfc5d3052011-05-06 20:34:06 +0000104
Eric Christopher50880d02010-09-18 18:52:28 +0000105 // Compute derived properties from the register classes
106 computeRegisterProperties();
107}
108
Justin Holewinski2d525c52011-04-28 00:19:56 +0000109MVT::SimpleValueType PTXTargetLowering::getSetCCResultType(EVT VT) const {
110 return MVT::i1;
111}
112
Che-Liang Chioufc7072c2010-12-22 10:38:51 +0000113SDValue PTXTargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const {
114 switch (Op.getOpcode()) {
Che-Liang Chiou88d33672011-03-18 11:08:52 +0000115 default:
116 llvm_unreachable("Unimplemented operand");
Justin Holewinski2d525c52011-04-28 00:19:56 +0000117 case ISD::SETCC:
118 return LowerSETCC(Op, DAG);
Che-Liang Chiou88d33672011-03-18 11:08:52 +0000119 case ISD::GlobalAddress:
120 return LowerGlobalAddress(Op, DAG);
Che-Liang Chioufc7072c2010-12-22 10:38:51 +0000121 }
122}
123
Eric Christopher50880d02010-09-18 18:52:28 +0000124const char *PTXTargetLowering::getTargetNodeName(unsigned Opcode) const {
125 switch (Opcode) {
Che-Liang Chiou8e5d01c2011-02-10 12:01:24 +0000126 default:
127 llvm_unreachable("Unknown opcode");
Justin Holewinski8af78c92011-03-18 19:24:28 +0000128 case PTXISD::COPY_ADDRESS:
129 return "PTXISD::COPY_ADDRESS";
Justin Holewinskia5ccb4e2011-06-23 18:10:05 +0000130 case PTXISD::LOAD_PARAM:
131 return "PTXISD::LOAD_PARAM";
Justin Holewinski67a91842011-06-23 18:10:03 +0000132 case PTXISD::STORE_PARAM:
133 return "PTXISD::STORE_PARAM";
Che-Liang Chiou8e5d01c2011-02-10 12:01:24 +0000134 case PTXISD::EXIT:
135 return "PTXISD::EXIT";
136 case PTXISD::RET:
137 return "PTXISD::RET";
Justin Holewinski4bdd4ed2011-08-09 17:36:31 +0000138 case PTXISD::CALL:
139 return "PTXISD::CALL";
Eric Christopher50880d02010-09-18 18:52:28 +0000140 }
141}
142
143//===----------------------------------------------------------------------===//
Che-Liang Chioufc7072c2010-12-22 10:38:51 +0000144// Custom Lower Operation
145//===----------------------------------------------------------------------===//
146
Justin Holewinski2d525c52011-04-28 00:19:56 +0000147SDValue PTXTargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) const {
148 assert(Op.getValueType() == MVT::i1 && "SetCC type must be 1-bit integer");
149 SDValue Op0 = Op.getOperand(0);
150 SDValue Op1 = Op.getOperand(1);
151 SDValue Op2 = Op.getOperand(2);
152 DebugLoc dl = Op.getDebugLoc();
153 ISD::CondCode CC = cast<CondCodeSDNode>(Op.getOperand(2))->get();
Justin Holewinskiec3141b2011-06-16 15:17:11 +0000154
Justin Holewinski2d525c52011-04-28 00:19:56 +0000155 // Look for X == 0, X == 1, X != 0, or X != 1
156 // We can simplify these to bitwise logic
Justin Holewinskiec3141b2011-06-16 15:17:11 +0000157
Justin Holewinski2d525c52011-04-28 00:19:56 +0000158 if (Op1.getOpcode() == ISD::Constant &&
159 (cast<ConstantSDNode>(Op1)->getZExtValue() == 1 ||
160 cast<ConstantSDNode>(Op1)->isNullValue()) &&
161 (CC == ISD::SETEQ || CC == ISD::SETNE)) {
162
Justin Holewinskiec3141b2011-06-16 15:17:11 +0000163 return DAG.getNode(ISD::AND, dl, MVT::i1, Op0, Op1);
Justin Holewinski2d525c52011-04-28 00:19:56 +0000164 }
Justin Holewinskiec3141b2011-06-16 15:17:11 +0000165
Justin Holewinski2d525c52011-04-28 00:19:56 +0000166 return DAG.getNode(ISD::SETCC, dl, MVT::i1, Op0, Op1, Op2);
167}
168
Che-Liang Chioufc7072c2010-12-22 10:38:51 +0000169SDValue PTXTargetLowering::
170LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const {
171 EVT PtrVT = getPointerTy();
172 DebugLoc dl = Op.getDebugLoc();
173 const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
Justin Holewinski8af78c92011-03-18 19:24:28 +0000174
Justin Holewinskid6625762011-03-23 16:58:51 +0000175 assert(PtrVT.isSimple() && "Pointer must be to primitive type.");
176
Justin Holewinski8af78c92011-03-18 19:24:28 +0000177 SDValue targetGlobal = DAG.getTargetGlobalAddress(GV, dl, PtrVT);
178 SDValue movInstr = DAG.getNode(PTXISD::COPY_ADDRESS,
179 dl,
Justin Holewinskid6625762011-03-23 16:58:51 +0000180 PtrVT.getSimpleVT(),
Justin Holewinski8af78c92011-03-18 19:24:28 +0000181 targetGlobal);
182
183 return movInstr;
Che-Liang Chioufc7072c2010-12-22 10:38:51 +0000184}
185
186//===----------------------------------------------------------------------===//
Eric Christopher50880d02010-09-18 18:52:28 +0000187// Calling Convention Implementation
188//===----------------------------------------------------------------------===//
189
190SDValue PTXTargetLowering::
191 LowerFormalArguments(SDValue Chain,
192 CallingConv::ID CallConv,
193 bool isVarArg,
194 const SmallVectorImpl<ISD::InputArg> &Ins,
195 DebugLoc dl,
196 SelectionDAG &DAG,
197 SmallVectorImpl<SDValue> &InVals) const {
Che-Liang Chioub48f2c22010-10-19 13:14:40 +0000198 if (isVarArg) llvm_unreachable("PTX does not support varargs");
199
Che-Liang Chiou3278c422010-11-08 03:00:52 +0000200 MachineFunction &MF = DAG.getMachineFunction();
Justin Holewinski67a91842011-06-23 18:10:03 +0000201 const PTXSubtarget& ST = getTargetMachine().getSubtarget<PTXSubtarget>();
Che-Liang Chiou3278c422010-11-08 03:00:52 +0000202 PTXMachineFunctionInfo *MFI = MF.getInfo<PTXMachineFunctionInfo>();
203
Che-Liang Chioub48f2c22010-10-19 13:14:40 +0000204 switch (CallConv) {
205 default:
206 llvm_unreachable("Unsupported calling convention");
207 break;
208 case CallingConv::PTX_Kernel:
Che-Liang Chiou8e5d01c2011-02-10 12:01:24 +0000209 MFI->setKernel(true);
Che-Liang Chioub48f2c22010-10-19 13:14:40 +0000210 break;
211 case CallingConv::PTX_Device:
Che-Liang Chiou3278c422010-11-08 03:00:52 +0000212 MFI->setKernel(false);
Che-Liang Chioub48f2c22010-10-19 13:14:40 +0000213 break;
214 }
215
Justin Holewinski67a91842011-06-23 18:10:03 +0000216 // We do one of two things here:
217 // IsKernel || SM >= 2.0 -> Use param space for arguments
218 // SM < 2.0 -> Use registers for arguments
Justin Holewinski35f4fb32011-06-24 16:27:49 +0000219 if (MFI->isKernel() || ST.useParamSpaceForDeviceArgs()) {
Justin Holewinskia5ccb4e2011-06-23 18:10:05 +0000220 // We just need to emit the proper LOAD_PARAM ISDs
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000221 for (unsigned i = 0, e = Ins.size(); i != e; ++i) {
Che-Liang Chiou8e5d01c2011-02-10 12:01:24 +0000222
Justin Holewinski67a91842011-06-23 18:10:03 +0000223 assert((!MFI->isKernel() || Ins[i].VT != MVT::i1) &&
224 "Kernels cannot take pred operands");
Che-Liang Chioub48f2c22010-10-19 13:14:40 +0000225
Justin Holewinskia5ccb4e2011-06-23 18:10:05 +0000226 SDValue ArgValue = DAG.getNode(PTXISD::LOAD_PARAM, dl, Ins[i].VT, Chain,
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000227 DAG.getTargetConstant(i, MVT::i32));
228 InVals.push_back(ArgValue);
Che-Liang Chioub48f2c22010-10-19 13:14:40 +0000229
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000230 // Instead of storing a physical register in our argument list, we just
231 // store the total size of the parameter, in bits. The ASM printer
232 // knows how to process this.
233 MFI->addArgReg(Ins[i].VT.getStoreSizeInBits());
234 }
Che-Liang Chioub48f2c22010-10-19 13:14:40 +0000235 }
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000236 else {
237 // For device functions, we use the PTX calling convention to do register
238 // assignments then create CopyFromReg ISDs for the allocated registers
Che-Liang Chioub48f2c22010-10-19 13:14:40 +0000239
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000240 SmallVector<CCValAssign, 16> ArgLocs;
241 CCState CCInfo(CallConv, isVarArg, MF, getTargetMachine(), ArgLocs,
242 *DAG.getContext());
243
244 CCInfo.AnalyzeFormalArguments(Ins, CC_PTX);
245
246 for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) {
247
248 CCValAssign& VA = ArgLocs[i];
249 EVT RegVT = VA.getLocVT();
250 TargetRegisterClass* TRC = 0;
251
252 assert(VA.isRegLoc() && "CCValAssign must be RegLoc");
253
254 // Determine which register class we need
255 if (RegVT == MVT::i1) {
256 TRC = PTX::RegPredRegisterClass;
257 }
258 else if (RegVT == MVT::i16) {
259 TRC = PTX::RegI16RegisterClass;
260 }
261 else if (RegVT == MVT::i32) {
262 TRC = PTX::RegI32RegisterClass;
263 }
264 else if (RegVT == MVT::i64) {
265 TRC = PTX::RegI64RegisterClass;
266 }
267 else if (RegVT == MVT::f32) {
268 TRC = PTX::RegF32RegisterClass;
269 }
270 else if (RegVT == MVT::f64) {
271 TRC = PTX::RegF64RegisterClass;
272 }
273 else {
274 llvm_unreachable("Unknown parameter type");
275 }
276
277 unsigned Reg = MF.getRegInfo().createVirtualRegister(TRC);
278 MF.getRegInfo().addLiveIn(VA.getLocReg(), Reg);
279
280 SDValue ArgValue = DAG.getCopyFromReg(Chain, dl, Reg, RegVT);
281 InVals.push_back(ArgValue);
282
283 MFI->addArgReg(VA.getLocReg());
284 }
285 }
Che-Liang Chiou3278c422010-11-08 03:00:52 +0000286
Eric Christopher50880d02010-09-18 18:52:28 +0000287 return Chain;
288}
289
290SDValue PTXTargetLowering::
291 LowerReturn(SDValue Chain,
292 CallingConv::ID CallConv,
293 bool isVarArg,
294 const SmallVectorImpl<ISD::OutputArg> &Outs,
295 const SmallVectorImpl<SDValue> &OutVals,
296 DebugLoc dl,
297 SelectionDAG &DAG) const {
Che-Liang Chioub48f2c22010-10-19 13:14:40 +0000298 if (isVarArg) llvm_unreachable("PTX does not support varargs");
Che-Liang Chiouf9930da2010-09-25 07:46:17 +0000299
300 switch (CallConv) {
301 default:
302 llvm_unreachable("Unsupported calling convention.");
303 case CallingConv::PTX_Kernel:
304 assert(Outs.size() == 0 && "Kernel must return void.");
305 return DAG.getNode(PTXISD::EXIT, dl, MVT::Other, Chain);
306 case CallingConv::PTX_Device:
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000307 //assert(Outs.size() <= 1 && "Can at most return one value.");
Che-Liang Chiouf9930da2010-09-25 07:46:17 +0000308 break;
309 }
310
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000311 MachineFunction& MF = DAG.getMachineFunction();
312 PTXMachineFunctionInfo *MFI = MF.getInfo<PTXMachineFunctionInfo>();
Che-Liang Chiouf9930da2010-09-25 07:46:17 +0000313
Che-Liang Chiouf9930da2010-09-25 07:46:17 +0000314 SDValue Flag;
Che-Liang Chiouf7172022011-02-28 06:34:09 +0000315
Justin Holewinskid8149c12011-06-23 18:10:13 +0000316 // Even though we could use the .param space for return arguments for
317 // device functions if SM >= 2.0 and the number of return arguments is
318 // only 1, we just always use registers since this makes the codegen
319 // easier.
320 SmallVector<CCValAssign, 16> RVLocs;
321 CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(),
322 getTargetMachine(), RVLocs, *DAG.getContext());
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000323
Justin Holewinskid8149c12011-06-23 18:10:13 +0000324 CCInfo.AnalyzeReturn(Outs, RetCC_PTX);
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000325
Justin Holewinskid8149c12011-06-23 18:10:13 +0000326 for (unsigned i = 0, e = RVLocs.size(); i != e; ++i) {
327 CCValAssign& VA = RVLocs[i];
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000328
Justin Holewinskid8149c12011-06-23 18:10:13 +0000329 assert(VA.isRegLoc() && "CCValAssign must be RegLoc");
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000330
Justin Holewinskid8149c12011-06-23 18:10:13 +0000331 unsigned Reg = VA.getLocReg();
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000332
Justin Holewinskid8149c12011-06-23 18:10:13 +0000333 DAG.getMachineFunction().getRegInfo().addLiveOut(Reg);
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000334
Justin Holewinskid8149c12011-06-23 18:10:13 +0000335 Chain = DAG.getCopyToReg(Chain, dl, Reg, OutVals[i], Flag);
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000336
Justin Holewinskid8149c12011-06-23 18:10:13 +0000337 // Guarantee that all emitted copies are stuck together,
338 // avoiding something bad
339 Flag = Chain.getValue(1);
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000340
Justin Holewinskid8149c12011-06-23 18:10:13 +0000341 MFI->addRetReg(Reg);
Che-Liang Chioufd8978b2011-03-02 03:20:28 +0000342 }
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000343
344 if (Flag.getNode() == 0) {
345 return DAG.getNode(PTXISD::RET, dl, MVT::Other, Chain);
Che-Liang Chiouf7172022011-02-28 06:34:09 +0000346 }
347 else {
Justin Holewinskie0aef2d2011-06-16 17:50:00 +0000348 return DAG.getNode(PTXISD::RET, dl, MVT::Other, Chain, Flag);
Che-Liang Chiouf7172022011-02-28 06:34:09 +0000349 }
Eric Christopher50880d02010-09-18 18:52:28 +0000350}
Justin Holewinski4bdd4ed2011-08-09 17:36:31 +0000351
352SDValue
353PTXTargetLowering::LowerCall(SDValue Chain, SDValue Callee,
354 CallingConv::ID CallConv, bool isVarArg,
355 bool &isTailCall,
356 const SmallVectorImpl<ISD::OutputArg> &Outs,
357 const SmallVectorImpl<SDValue> &OutVals,
358 const SmallVectorImpl<ISD::InputArg> &Ins,
359 DebugLoc dl, SelectionDAG &DAG,
360 SmallVectorImpl<SDValue> &InVals) const {
361
362 MachineFunction& MF = DAG.getMachineFunction();
363 PTXMachineFunctionInfo *MFI = MF.getInfo<PTXMachineFunctionInfo>();
Justin Holewinski4bdd4ed2011-08-09 17:36:31 +0000364
Duncan Sands1f6a3292011-08-12 14:54:45 +0000365 assert(getTargetMachine().getSubtarget<PTXSubtarget>().callsAreHandled() &&
366 "Calls are not handled for the target device");
Justin Holewinski4bdd4ed2011-08-09 17:36:31 +0000367
368 // Is there a more "LLVM"-way to create a variable-length array of values?
369 SDValue* ops = new SDValue[OutVals.size() + 2];
370
371 ops[0] = Chain;
372
373 if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) {
374 const GlobalValue *GV = G->getGlobal();
375 Callee = DAG.getTargetGlobalAddress(GV, dl, getPointerTy());
376 ops[1] = Callee;
377 } else {
378 assert(false && "Function must be a GlobalAddressSDNode");
379 }
380
381 for (unsigned i = 0; i != OutVals.size(); ++i) {
382 unsigned Size = OutVals[i].getValueType().getSizeInBits();
383 SDValue Index = DAG.getTargetConstant(MFI->getNextParam(Size), MVT::i32);
384 Chain = DAG.getNode(PTXISD::STORE_PARAM, dl, MVT::Other, Chain,
385 Index, OutVals[i]);
386 ops[i+2] = Index;
387 }
388
389 ops[0] = Chain;
390
391 Chain = DAG.getNode(PTXISD::CALL, dl, MVT::Other, ops, OutVals.size()+2);
392
393 delete [] ops;
394
395 return Chain;
396}