From 9cb9626abf26dfcbbe8d02013c5b780c318cb321 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 25 Feb 2007 06:21:57 +0000 Subject: [PATCH] remove std::vector's in RET lowering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34576 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ISelLowering.cpp | 33 ++++++++++-------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 9371407f1cf..83e7bab1385 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -4014,13 +4014,9 @@ SDOperand X86TargetLowering::LowerRET(SDOperand Op, SelectionDAG &DAG) { if (DAG.getMachineFunction().liveout_empty()) DAG.getMachineFunction().addLiveOut(X86::ST0); - std::vector Tys; - Tys.push_back(MVT::Other); - Tys.push_back(MVT::Flag); - std::vector Ops; - Ops.push_back(Op.getOperand(0)); - Ops.push_back(Op.getOperand(1)); - Copy = DAG.getNode(X86ISD::FP_SET_RESULT, Tys, &Ops[0], Ops.size()); + SDVTList Tys = DAG.getVTList(MVT::Other, MVT::Flag); + SDOperand Ops[] = { Op.getOperand(0), Op.getOperand(1) }; + Copy = DAG.getNode(X86ISD::FP_SET_RESULT, Tys, Ops, 2); } else { // FP return with ScalarSSE (return on fp-stack). if (DAG.getMachineFunction().liveout_empty()) @@ -4042,21 +4038,14 @@ SDOperand X86TargetLowering::LowerRET(SDOperand Op, SelectionDAG &DAG) { MemLoc = DAG.getFrameIndex(SSFI, getPointerTy()); Chain = DAG.getStore(Op.getOperand(0), Value, MemLoc, NULL, 0); } - std::vector Tys; - Tys.push_back(MVT::f64); - Tys.push_back(MVT::Other); - std::vector Ops; - Ops.push_back(Chain); - Ops.push_back(MemLoc); - Ops.push_back(DAG.getValueType(ArgVT)); - Copy = DAG.getNode(X86ISD::FLD, Tys, &Ops[0], Ops.size()); - Tys.clear(); - Tys.push_back(MVT::Other); - Tys.push_back(MVT::Flag); - Ops.clear(); - Ops.push_back(Copy.getValue(1)); - Ops.push_back(Copy); - Copy = DAG.getNode(X86ISD::FP_SET_RESULT, Tys, &Ops[0], Ops.size()); + SDVTList Tys = DAG.getVTList(MVT::f64, MVT::Other); + SDOperand Ops[] = { Chain, MemLoc, DAG.getValueType(ArgVT) }; + Copy = DAG.getNode(X86ISD::FLD, Tys, Ops, 3); + + Tys = DAG.getVTList(MVT::Other, MVT::Flag); + Ops[0] = Copy.getValue(1); + Ops[1] = Copy; + Copy = DAG.getNode(X86ISD::FP_SET_RESULT, Tys, Ops, 2); } break; } -- 2.34.1