llvm-project/clang/lib
Sanjay Patel 3e287b4d35 [CodeGen] convert math libcalls/builtins to equivalent LLVM intrinsics
There are 20 LLVM math intrinsics that correspond to mathlib calls according to the LangRef:
http://llvm.org/docs/LangRef.html#standard-c-library-intrinsics

We were only converting 3 mathlib calls (sqrt, fma, pow) and 12 builtin calls (ceil, copysign, 
fabs, floor, fma, fmax, fmin, nearbyint, pow, rint, round, trunc) to their intrinsic-equivalents.

This patch pulls the transforms together and handles all 20 cases. The switch is guarded by a 
check for const-ness to make sure we're not doing the transform if errno could possibly be set by
the libcall or builtin.

Differential Revision: https://reviews.llvm.org/D40044

llvm-svn: 319593
2017-12-01 23:15:52 +00:00
..
ARCMigrate Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC. 2017-06-03 06:23:19 +00:00
AST [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-12-01 22:04:49 +00:00
ASTMatchers Add the hasDefinition() AST matcher to match class declarations that also have a definition. 2017-11-29 21:21:51 +00:00
Analysis [analyzer] Teach RetainCountChecker about CoreMedia APIs 2017-11-25 14:57:42 +00:00
Basic Toolchain: Normalize dwarf, sjlj and seh eh 2017-11-29 07:25:12 +00:00
CodeGen [CodeGen] convert math libcalls/builtins to equivalent LLVM intrinsics 2017-12-01 23:15:52 +00:00
CrossTU [CrossTU] Fix handling of Cross Translation Unit directory path 2017-10-27 12:53:37 +00:00
Driver Revert [ARM] disable FPU features when using soft floating point. 2017-11-30 12:05:18 +00:00
Edit [clang] Fix format specifiers fixits for nested macros 2017-06-20 20:46:58 +00:00
Format Better trade-off for excess characters vs. staying within the column limits. 2017-12-01 13:28:08 +00:00
Frontend [XRay][clang] Introduce -fxray-always-emit-customevents 2017-11-30 00:04:54 +00:00
FrontendTool [CMake] Use #cmakedefine01 for CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER) 2017-10-18 05:21:17 +00:00
Headers [clang] Use add_llvm_install_targets 2017-11-30 22:35:02 +00:00
Index [index] tag declarations should use the decl role instead of ref 2017-11-09 20:50:59 +00:00
Lex [c++2a] P0515R3: lexer support for new <=> token. 2017-12-01 01:07:10 +00:00
Parse [c++2a] P0515R3: Support for overloaded operator<=>. 2017-12-01 02:13:10 +00:00
Rewrite [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output 2017-08-03 18:12:22 +00:00
Sema [c++17] When deducing the type of a non-type template parameter from the type 2017-12-01 21:24:36 +00:00
Serialization [OPENMP] Add support for cancel constructs in `target teams distribute 2017-11-22 21:12:03 +00:00
StaticAnalyzer [analyzer] Fix false negative on post-increment of uninitialized variable. 2017-11-30 09:18:35 +00:00
Tooling [Tooling] Acknowledge that many CompilationDatabases don't support enumeration. 2017-11-24 12:13:55 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00