This is an archive of the discontinued LLVM Phabricator instance.

[libc] Apply no-builtin everywhere, remove unnecessary flags
ClosedPublic

Authored by gchatelet on May 18 2022, 8:24 AM.

Details

Summary

Some functions like stpncpy are implemented in terms of memset but are not
currently using -fno-builtin-memset. This is somewhat hidden by the fact that
we use -ffreestanding globally and that -ffreestanding implies
-fno-builtin for Clang.

This patch also removes -mllvm -combiner-global-alias-analysis that is Clang
specific and that does not bring substantial gains on modern processors.

Also we keep -mllvm --tail-merge-threshold=0 for aarch64 in CMakeLists.txt
but we omit it in the Bazel config. This is because Bazel consumes the source
files directly and so it can use PGO to take optimal decisions locally.

Diff Detail

Event Timeline

gchatelet created this revision.May 18 2022, 8:24 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 18 2022, 8:24 AM
gchatelet requested review of this revision.May 18 2022, 8:24 AM
sivachandra accepted this revision.May 18 2022, 9:33 AM

One nit: We want to limit the commit messages also to 80 char width.

This revision is now accepted and ready to land.May 18 2022, 9:33 AM
gchatelet updated this revision to Diff 430602.May 19 2022, 1:59 AM

Format commit message

gchatelet edited the summary of this revision. (Show Details)May 19 2022, 2:00 AM
gchatelet edited the summary of this revision. (Show Details)