diff options
author | Dale Johannesen <dalej@apple.com> | 2008-09-26 19:31:26 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-09-26 19:31:26 +0000 |
commit | 0e32a2c935557712c9a29d53df36e6a32b01981e (patch) | |
tree | 74978166400636f3f3db3ec0aeabba4f57f1c2da /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
parent | 007a6bb9b98659acf3230a9180e07e2afa5f4137 (diff) | |
download | bcm5719-llvm-0e32a2c935557712c9a29d53df36e6a32b01981e.tar.gz bcm5719-llvm-0e32a2c935557712c9a29d53df36e6a32b01981e.zip |
Add "inreg" field to CallSDNode (doesn't increase
its size). Adjust various lowering functions to
pass this info through from CallInst. Use it to
implement sseregparm returns on X86. Remove
X86_ssecall calling convention.
llvm-svn: 56677
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index dc9d654d572..76902505bc6 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -4123,8 +4123,9 @@ void SelectionDAGLowering::LowerCallTo(CallSite CS, SDValue Callee, std::pair<SDValue,SDValue> Result = TLI.LowerCallTo(getRoot(), CS.getType(), CS.paramHasAttr(0, Attribute::SExt), - CS.paramHasAttr(0, Attribute::ZExt), - FTy->isVarArg(), CS.getCallingConv(), + CS.paramHasAttr(0, Attribute::ZExt), FTy->isVarArg(), + CS.paramHasAttr(0, Attribute::InReg), + CS.getCallingConv(), IsTailCall && PerformTailCallOpt, Callee, Args, DAG); if (CS.getType() != Type::VoidTy) @@ -5050,8 +5051,9 @@ void SelectionDAGLowering::visitMalloc(MallocInst &I) { Args.push_back(Entry); std::pair<SDValue,SDValue> Result = - TLI.LowerCallTo(getRoot(), I.getType(), false, false, false, CallingConv::C, - PerformTailCallOpt, DAG.getExternalSymbol("malloc", IntPtr), + TLI.LowerCallTo(getRoot(), I.getType(), false, false, false, false, + CallingConv::C, PerformTailCallOpt, + DAG.getExternalSymbol("malloc", IntPtr), Args, DAG); setValue(&I, Result.first); // Pointers always fit in registers DAG.setRoot(Result.second); @@ -5065,7 +5067,7 @@ void SelectionDAGLowering::visitFree(FreeInst &I) { Args.push_back(Entry); MVT IntPtr = TLI.getPointerTy(); std::pair<SDValue,SDValue> Result = - TLI.LowerCallTo(getRoot(), Type::VoidTy, false, false, false, + TLI.LowerCallTo(getRoot(), Type::VoidTy, false, false, false, false, CallingConv::C, PerformTailCallOpt, DAG.getExternalSymbol("free", IntPtr), Args, DAG); DAG.setRoot(Result.second); @@ -5234,6 +5236,7 @@ void TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG, std::pair<SDValue, SDValue> TargetLowering::LowerCallTo(SDValue Chain, const Type *RetTy, bool RetSExt, bool RetZExt, bool isVarArg, + bool isInreg, unsigned CallingConv, bool isTailCall, SDValue Callee, ArgListTy &Args, SelectionDAG &DAG) { @@ -5326,10 +5329,11 @@ TargetLowering::LowerCallTo(SDValue Chain, const Type *RetTy, LoweredRetTys.push_back(MVT::Other); // Always has a chain. // Create the CALL node. - SDValue Res = DAG.getCall(CallingConv, isVarArg, isTailCall, + SDValue Res = DAG.getCall(CallingConv, isVarArg, isTailCall, isInreg, DAG.getVTList(&LoweredRetTys[0], LoweredRetTys.size()), - &Ops[0], Ops.size()); + &Ops[0], Ops.size() + ); Chain = Res.getValue(LoweredRetTys.size() - 1); // Gather up the call result into a single value. |