[llvm-commits] [llvm] r54316 - in /llvm/trunk/lib/Target/Mips: MipsISelLowering.cpp MipsISelLowering.h
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Mon Aug 4 00:12:53 PDT 2008
Author: bruno
Date: Mon Aug 4 02:12:52 2008
New Revision: 54316
URL: http://llvm.org/viewvc/llvm-project?rev=54316&view=rev
Log:
Mips ISelLowering cleanup : Removed old LowerCALL and FORMAL_ARGS helpers, they
aren't used anyway, they also used to broke compiling when fastcc was specified for a
function, but not anymore.
Modified:
llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
llvm/trunk/lib/Target/Mips/MipsISelLowering.h
Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=54316&r1=54315&r2=54316&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Mon Aug 4 02:12:52 2008
@@ -556,34 +556,19 @@
// CALL Calling Convention Implementation
//===----------------------------------------------------------------------===//
-/// Mips custom CALL implementation
-SDValue MipsTargetLowering::
-LowerCALL(SDValue Op, SelectionDAG &DAG)
-{
- unsigned CallingConv = cast<ConstantSDNode>(Op.getOperand(1))->getValue();
-
- // By now, only CallingConv::C implemented
- switch (CallingConv) {
- default:
- assert(0 && "Unsupported calling convention");
- case CallingConv::Fast:
- case CallingConv::C:
- return LowerCCCCallTo(Op, DAG, CallingConv);
- }
-}
-
/// LowerCCCCallTo - functions arguments are copied from virtual
/// regs to (physical regs)/(stack frame), CALLSEQ_START and
/// CALLSEQ_END are emitted.
/// TODO: isVarArg, isTailCall.
SDValue MipsTargetLowering::
-LowerCCCCallTo(SDValue Op, SelectionDAG &DAG, unsigned CC)
+LowerCALL(SDValue Op, SelectionDAG &DAG)
{
MachineFunction &MF = DAG.getMachineFunction();
- SDValue Chain = Op.getOperand(0);
+ SDValue Chain = Op.getOperand(0);
SDValue Callee = Op.getOperand(4);
- bool isVarArg = cast<ConstantSDNode>(Op.getOperand(2))->getValue() != 0;
+ bool isVarArg = cast<ConstantSDNode>(Op.getOperand(2))->getValue() != 0;
+ unsigned CC = DAG.getMachineFunction().getFunction()->getCallingConv();
MachineFrameInfo *MFI = MF.getFrameInfo();
@@ -786,34 +771,20 @@
// FORMAL_ARGUMENTS Calling Convention Implementation
//===----------------------------------------------------------------------===//
-/// Mips custom FORMAL_ARGUMENTS implementation
-SDValue MipsTargetLowering::
-LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG)
-{
- unsigned CC = cast<ConstantSDNode>(Op.getOperand(1))->getValue();
- switch(CC)
- {
- default:
- assert(0 && "Unsupported calling convention");
- case CallingConv::C:
- return LowerCCCArguments(Op, DAG);
- }
-}
-
-/// LowerCCCArguments - transform physical registers into
+/// LowerFORMAL_ARGUMENTS - transform physical registers into
/// virtual registers and generate load operations for
/// arguments places on the stack.
/// TODO: isVarArg
SDValue MipsTargetLowering::
-LowerCCCArguments(SDValue Op, SelectionDAG &DAG)
+LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG)
{
- SDValue Root = Op.getOperand(0);
- MachineFunction &MF = DAG.getMachineFunction();
+ SDValue Root = Op.getOperand(0);
+ MachineFunction &MF = DAG.getMachineFunction();
MachineFrameInfo *MFI = MF.getFrameInfo();
MipsFunctionInfo *MipsFI = MF.getInfo<MipsFunctionInfo>();
bool isVarArg = cast<ConstantSDNode>(Op.getOperand(2))->getValue() != 0;
- unsigned CC = DAG.getMachineFunction().getFunction()->getCallingConv();
+ unsigned CC = DAG.getMachineFunction().getFunction()->getCallingConv();
unsigned StackReg = MF.getTarget().getRegisterInfo()->getFrameRegister(MF);
Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.h?rev=54316&r1=54315&r2=54316&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelLowering.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelLowering.h Mon Aug 4 02:12:52 2008
@@ -83,8 +83,6 @@
const MipsSubtarget *Subtarget;
// Lower Operand helpers
- SDValue LowerCCCArguments(SDValue Op, SelectionDAG &DAG);
- SDValue LowerCCCCallTo(SDValue Op, SelectionDAG &DAG, unsigned CC);
SDNode *LowerCallResult(SDValue Chain, SDValue InFlag, SDNode*TheCall,
unsigned CallingConv, SelectionDAG &DAG);
bool IsGlobalInSmallSection(GlobalValue *GV);
More information about the llvm-commits
mailing list