aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PIC16
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-01-27 00:07:07 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-01-27 00:07:07 +0000
commit6b6ed5994d4c2be6e2087a969b35f55226d82608 (patch)
tree0900b4bd1e1489b3e42021affea56810029efa23 /lib/Target/PIC16
parente81b7948258c692cccbc3c38905e9f12de96d8bd (diff)
downloadexternal_llvm-6b6ed5994d4c2be6e2087a969b35f55226d82608.zip
external_llvm-6b6ed5994d4c2be6e2087a969b35f55226d82608.tar.gz
external_llvm-6b6ed5994d4c2be6e2087a969b35f55226d82608.tar.bz2
Eliminate target hook IsEligibleForTailCallOptimization.
Target independent isel should always pass along the "tail call" property. Change target hook LowerCall's parameter "isTailCall" into a refernce. If the target decides it's impossible to honor the tail call request, it should set isTailCall to false to make target independent isel happy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16')
-rw-r--r--lib/Target/PIC16/PIC16ISelLowering.cpp4
-rw-r--r--lib/Target/PIC16/PIC16ISelLowering.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/PIC16/PIC16ISelLowering.cpp b/lib/Target/PIC16/PIC16ISelLowering.cpp
index 9f093e8..7754a4f 100644
--- a/lib/Target/PIC16/PIC16ISelLowering.cpp
+++ b/lib/Target/PIC16/PIC16ISelLowering.cpp
@@ -1355,11 +1355,13 @@ GetDataAddress(DebugLoc dl, SDValue Callee, SDValue &Chain,
SDValue
PIC16TargetLowering::LowerCall(SDValue Chain, SDValue Callee,
CallingConv::ID CallConv, bool isVarArg,
- bool isTailCall,
+ bool &isTailCall,
const SmallVectorImpl<ISD::OutputArg> &Outs,
const SmallVectorImpl<ISD::InputArg> &Ins,
DebugLoc dl, SelectionDAG &DAG,
SmallVectorImpl<SDValue> &InVals) {
+ // PIC16 target does not yet support tail call optimization.
+ isTailCall = false;
assert(Callee.getValueType() == MVT::i16 &&
"Don't know how to legalize this call node!!!");
diff --git a/lib/Target/PIC16/PIC16ISelLowering.h b/lib/Target/PIC16/PIC16ISelLowering.h
index afdd4b4..de14520 100644
--- a/lib/Target/PIC16/PIC16ISelLowering.h
+++ b/lib/Target/PIC16/PIC16ISelLowering.h
@@ -143,7 +143,7 @@ namespace llvm {
virtual SDValue
LowerCall(SDValue Chain, SDValue Callee,
- CallingConv::ID CallConv, bool isVarArg, bool isTailCall,
+ CallingConv::ID CallConv, bool isVarArg, bool &isTailCall,
const SmallVectorImpl<ISD::OutputArg> &Outs,
const SmallVectorImpl<ISD::InputArg> &Ins,
DebugLoc dl, SelectionDAG &DAG,