mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-14 23:48:49 +00:00
a3a48d96c9
This patch adds optional fast-math-flags (the same that apply to fmul/fadd/fsub/fdiv/frem/fcmp) to call instructions in IR. Follow-up patches would use these flags in LibCallSimplifier, add support to clang, and extend FMF to the DAG for calls. Motivating example: %y = fmul fast float %x, %x %z = tail call float @sqrtf(float %y) We'd like to be able to optimize sqrt(x*x) into fabs(x). We do this today using a function-wide attribute for unsafe-math, but we really want to trigger on the instructions themselves: %z = tail call fast float @sqrtf(float %y) because in an LTO build it's possible that calls with fast semantics have been inlined into a function with non-fast semantics. The code changes and tests are based on the recent commits that added "notail": http://reviews.llvm.org/rL252368 and added FMF to fcmp: http://reviews.llvm.org/rL241901 Differential Revision: http://reviews.llvm.org/D14707 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255555 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
AttributesTest.cpp | ||
CMakeLists.txt | ||
ConstantRangeTest.cpp | ||
ConstantsTest.cpp | ||
DebugInfoTest.cpp | ||
DominatorTreeTest.cpp | ||
InstructionsTest.cpp | ||
IRBuilderTest.cpp | ||
LegacyPassManagerTest.cpp | ||
Makefile | ||
MDBuilderTest.cpp | ||
MetadataTest.cpp | ||
PassManagerTest.cpp | ||
PatternMatch.cpp | ||
TypeBuilderTest.cpp | ||
TypesTest.cpp | ||
UserTest.cpp | ||
UseTest.cpp | ||
ValueHandleTest.cpp | ||
ValueMapTest.cpp | ||
ValueTest.cpp | ||
VerifierTest.cpp | ||
WaymarkTest.cpp |