Pass callsite return type to TargetLowering::LowerCall and use that to check sibcall...
[oota-llvm.git] / include / llvm / Target / TargetLowering.h
index 9b078ef1b6bc3d71dabebeb5fc7a81222c74dcf7..55619de0602ffcf9bdcfca4c58c9da4cb8c41b7a 100644 (file)
@@ -761,6 +761,7 @@ public:
                             const MachineBasicBlock *MBB, unsigned uid,
                             MCContext &Ctx) const {
     assert(0 && "Need to implement this hook if target has custom JTIs");
+    return 0;
   }
   
   /// getPICJumpTableRelocaBase - Returns relocation base for the given PIC
@@ -1166,15 +1167,9 @@ public:
   /// described by the Ins array. The implementation should fill in the
   /// InVals array with legal-type return values from the call, and return
   /// the resulting token chain value.
-  ///
-  /// The isTailCall flag here is normative. If it is true, the
-  /// implementation must emit a tail call. The
-  /// IsEligibleForTailCallOptimization hook should be used to catch
-  /// cases that cannot be handled.
-  ///
   virtual SDValue
-    LowerCall(SDValue Chain, SDValue Callee,
-              CallingConv::ID CallConv, bool isVarArg, bool isTailCall,
+    LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy,
+              CallingConv::ID CallConv, bool isVarArg, bool &isTailCall,
               const SmallVectorImpl<ISD::OutputArg> &Outs,
               const SmallVectorImpl<ISD::InputArg> &Ins,
               DebugLoc dl, SelectionDAG &DAG,
@@ -1300,19 +1295,6 @@ public:
     assert(0 && "ReplaceNodeResults not implemented for this target!");
   }
 
-  /// IsEligibleForTailCallOptimization - Check whether the call is eligible for
-  /// tail call optimization. Targets which want to do tail call optimization
-  /// should override this function.
-  virtual bool
-  IsEligibleForTailCallOptimization(SDValue Callee,
-                                    CallingConv::ID CalleeCC,
-                                    bool isVarArg,
-                                    const SmallVectorImpl<ISD::InputArg> &Ins,
-                                    SelectionDAG& DAG) const {
-    // Conservative default: no calls are eligible.
-    return false;
-  }
-
   /// getTargetNodeName() - This method returns the name of a target specific
   /// DAG node.
   virtual const char *getTargetNodeName(unsigned Opcode) const;