diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2012-02-28 06:42:03 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2012-02-28 06:42:03 +0000 |
| commit | 87c7b09d8d7e7f04b720d298a7194c4473a8c524 (patch) | |
| tree | bbb0ebbd77e5a544fbe06f60bbb05802170d23d1 /llvm/lib/Target/MBlaze | |
| parent | ccd651cac84b0620192f0ca404a841d52ad3a387 (diff) | |
| download | bcm5719-llvm-87c7b09d8d7e7f04b720d298a7194c4473a8c524.tar.gz bcm5719-llvm-87c7b09d8d7e7f04b720d298a7194c4473a8c524.zip | |
Some ARM implementaions, e.g. A-series, does return stack prediction. That is,
the processor keeps a return addresses stack (RAS) which stores the address
and the instruction execution state of the instruction after a function-call
type branch instruction.
Calling a "noreturn" function with normal call instructions (e.g. bl) can
corrupt RAS and causes 100% return misprediction so LLVM should use a
unconditional branch instead. i.e.
mov lr, pc
b _foo
The "mov lr, pc" is issued in order to get proper backtrace.
rdar://8979299
llvm-svn: 151623
Diffstat (limited to 'llvm/lib/Target/MBlaze')
| -rw-r--r-- | llvm/lib/Target/MBlaze/MBlazeISelLowering.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Target/MBlaze/MBlazeISelLowering.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/MBlaze/MBlazeISelLowering.cpp b/llvm/lib/Target/MBlaze/MBlazeISelLowering.cpp index 4b5e82d466b..23c8e1367fb 100644 --- a/llvm/lib/Target/MBlaze/MBlazeISelLowering.cpp +++ b/llvm/lib/Target/MBlaze/MBlazeISelLowering.cpp @@ -682,7 +682,7 @@ static bool CC_MBlaze_AssignReg(unsigned &ValNo, MVT &ValVT, MVT &LocVT, /// TODO: isVarArg, isTailCall. SDValue MBlazeTargetLowering:: LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, - bool isVarArg, bool &isTailCall, + bool isVarArg, bool doesNotRet, bool &isTailCall, const SmallVectorImpl<ISD::OutputArg> &Outs, const SmallVectorImpl<SDValue> &OutVals, const SmallVectorImpl<ISD::InputArg> &Ins, diff --git a/llvm/lib/Target/MBlaze/MBlazeISelLowering.h b/llvm/lib/Target/MBlaze/MBlazeISelLowering.h index 8b49bc3de0c..168694b0a49 100644 --- a/llvm/lib/Target/MBlaze/MBlazeISelLowering.h +++ b/llvm/lib/Target/MBlaze/MBlazeISelLowering.h @@ -134,7 +134,7 @@ namespace llvm { virtual SDValue LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, - bool &isTailCall, + bool doesNotRet, bool &isTailCall, const SmallVectorImpl<ISD::OutputArg> &Outs, const SmallVectorImpl<SDValue> &OutVals, const SmallVectorImpl<ISD::InputArg> &Ins, |

