From fa1211f69bff82013a10a89298229398da8fab9b Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 23 Jul 2008 00:34:11 +0000 Subject: Enable first-class aggregates support. Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. llvm-svn: 53941 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 12c54c1eeff..fdc3d25bd58 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -806,8 +806,6 @@ public: void visitVAEnd(CallInst &I); void visitVACopy(CallInst &I); - void visitGetResult(GetResultInst &I); - void visitUserOp1(Instruction &I) { assert(0 && "UserOp1 should not exist at instruction selection time!"); abort(); @@ -3688,24 +3686,6 @@ void SelectionDAGLowering::visitCall(CallInst &I) { } -void SelectionDAGLowering::visitGetResult(GetResultInst &I) { - if (isa(I.getOperand(0))) { - SDOperand Undef = DAG.getNode(ISD::UNDEF, TLI.getValueType(I.getType())); - setValue(&I, Undef); - return; - } - - // To add support for individual return values with aggregate types, - // we'd need a way to take a getresult index and determine which - // values of the Call SDNode are associated with it. - assert(TLI.getValueType(I.getType(), true) != MVT::Other && - "Individual return values must not be aggregates!"); - - SDOperand Call = getValue(I.getOperand(0)); - setValue(&I, SDOperand(Call.Val, I.getIndex())); -} - - /// getCopyFromRegs - Emit a series of CopyFromReg nodes that copies from /// this value and returns the result as a ValueVT value. This uses /// Chain/Flag as the input and updates them for the output Chain/Flag. -- cgit v1.2.3