[PATCH] D34796: upporting -f(no)-reorder-functions flag, clang side change
Taewook Oh via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 28 18:10:39 PDT 2017
twoh created this revision.
When profile data is given, .hot/.unlikely section prefix is
added to hot/cold functions for linker to improve code locality. GCC
controls this behavior with '-f(no)-reorder-functions' flag, while LLVM
uses opt tool option '-profile-guided-section-prefix=true/false'. This
patch is for LLVM to support the same driver flag with GCC. LLVM side
patch is https://reviews.llvm.org/D34795.
https://reviews.llvm.org/D34796
Files:
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/BackendUtil.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/Inputs/freorder-functions.prof
test/CodeGen/freorder-functions.c
test/Driver/function-sections.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34796.104568.patch
Type: text/x-patch
Size: 6234 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170629/1b2e67dd/attachment.bin>
More information about the cfe-commits
mailing list