Skip to content

Commit 88d5479

Browse files
committed
Add a few Compiler flags to optimize llvm-libc for binary size and math throughput performances
1 parent 605de63 commit 88d5479

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tools/system_libs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,15 +1015,14 @@ class llvmlibc(DebugLibrary, AsanInstrumentedLibrary, MTLibrary):
10151015
'-DLIBC_COPT_PUBLIC_PACKAGING',
10161016
# Disable accurate pass to speed up certain math operations
10171017
'-DLIBC_MATH=LIBC_MATH_FAST',
1018-
'-DLIBC_MATH_SKIP_ACCURATE_PASS',
10191018
'-D__LIBC_USE_BUILTIN_CEIL_FLOOR_RINT_TRUNC',
10201019
# Reduce size bloats from string conversions.
10211020
'-DLIBC_COPT_STRTOFLOAT_DISABLE_EISEL_LEMIRE',
10221021
# To Enable FMA, we need to set the following flags. But we can't really ship this in a default libc build.
10231022
# Once llvm-libc gets used, we might need to have a FMA-enalbed flavor to enable these following flags.
10241023
'-Wno-unused-variable',
10251024
'-mrelaxed-simd',
1026-
'-ffast-math',
1025+
'-fp-contract=fast',
10271026
]
10281027

10291028
def get_files(self):

0 commit comments

Comments
 (0)