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/ARM/ARMSelectionDAGInfo.cpp | |
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/ARM/ARMSelectionDAGInfo.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp index 3113b62c1f7..e2530d07e23 100644 --- a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp +++ b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp @@ -189,6 +189,7 @@ EmitTargetCodeForMemset(SelectionDAG &DAG, DebugLoc dl, 0, // number of fixed arguments TLI.getLibcallCallingConv(RTLIB::MEMSET), // call conv false, // is tail call + false, // does not return false, // is return val used DAG.getExternalSymbol(TLI.getLibcallName(RTLIB::MEMSET), TLI.getPointerTy()), // callee |