diff options
author | Chris Lattner <sabre@nondot.org> | 2006-06-06 21:45:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-06-06 21:45:47 +0000 |
commit | 16826c3503c8b5e6f87c6e87e5320ce8e47db814 (patch) | |
tree | 8e583f744b5de4da324f9e57d6d0ec85f1a72f7e /llvm/lib/Target/CBackend | |
parent | c8587d4b81b6deff8ed55886ab9896dbde289e74 (diff) | |
download | bcm5719-llvm-16826c3503c8b5e6f87c6e87e5320ce8e47db814.tar.gz bcm5719-llvm-16826c3503c8b5e6f87c6e87e5320ce8e47db814.zip |
Now that PR633 is implemented, the CBE can know to emit _setjmp/_longjmp
when available. This speeds up hexxagon from 18.61s to 16.61s with the CBE on
PPC Mac OS (for reference, LLC is 15.48s and GCC is 23.35s).
llvm-svn: 28697
Diffstat (limited to 'llvm/lib/Target/CBackend')
-rw-r--r-- | llvm/lib/Target/CBackend/Writer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp index 36336b38d58..692232b78e0 100644 --- a/llvm/lib/Target/CBackend/Writer.cpp +++ b/llvm/lib/Target/CBackend/Writer.cpp @@ -1779,11 +1779,17 @@ void CWriter::visitCallInst(CallInst &I) { Out << ')'; return; case Intrinsic::setjmp: +#if defined(HAVE__SETJMP) && defined(HAVE__LONGJMP) + Out << "_"; // Use _setjmp on systems that support it! +#endif Out << "setjmp(*(jmp_buf*)"; writeOperand(I.getOperand(1)); Out << ')'; return; case Intrinsic::longjmp: +#if defined(HAVE__SETJMP) && defined(HAVE__LONGJMP) + Out << "_"; // Use _longjmp on systems that support it! +#endif Out << "longjmp(*(jmp_buf*)"; writeOperand(I.getOperand(1)); Out << ", "; |