[PATCH] D15829: [PGO] Clang Option that enables IR level PGO instrumentation
Rong Xu via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 4 14:09:29 PST 2016
xur updated this revision to Diff 46960.
xur added a comment.
Now http://reviews.llvm.org/D16730 has been committed (as r259811)
Here is the patch that adds cc1 option -fprofile-instrument=llvm to enable IR level PGO generate and use.
The pgo use part of the patch depends http://reviews.llvm.org/D15540 which differentiates the IR level and clang profiles. To detect the profile automatically, we need to first the profile. It can either done in driver or in Clang codegen (lib/CodeGen/CodeGenModule.cpp). If we do this in Clang codegen, we would have to change the Codegen option which does not seem to be a good approach. As a result, we do this in the driver in this patch.
Again like in http://reviews.llvm.org/D16730, this patch won't change any driver (user level) options. Only cc1 options are touched.
Thanks,
-Rong
http://reviews.llvm.org/D15829
Files:
include/clang/Driver/CC1Options.td
include/clang/Frontend/CodeGenOptions.h
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CodeGenModule.cpp
lib/Driver/CMakeLists.txt
lib/Driver/Tools.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/Inputs/pgotestclang.profraw
test/CodeGen/Inputs/pgotestir.profraw
test/CodeGen/pgo-instrumentation.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15829.46960.patch
Type: text/x-patch
Size: 8889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160204/1d195a58/attachment-0001.bin>
More information about the cfe-commits
mailing list