[PATCH] D15829: [PGO] Clang Option that enables IR level PGO instrumentation

Rong Xu via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 25 16:45:44 PST 2016


xur updated this revision to Diff 45929.
xur marked an inline comment as done.
xur added a comment.

Here is the new patch. Changes from previous patch are:
(1) rename codegen option ProfileInstrGenerate to ClangProfInstrGen to avoid the name confusion (Davidxl). This option is for clang instrumentation only.
(2) improve the test suggested by Sean.
(3) move the logic of checking if argument ProfileIRInstr needs to be added to Tools.C (suggested by Chad and Sean). This still does not look very clean -- I need to manually expand the -Xclang option for this. The difficulty here is that we have shared driver level arguments (-fprofile-generate and -fprofile-use etc) and there is no cc1 option for clang instrumentation. Once we have driver level option for IR level instrumentation, the code can be improved.


http://reviews.llvm.org/D15829

Files:
  include/clang/Driver/CC1Options.td
  include/clang/Frontend/CodeGenOptions.def
  lib/CodeGen/BackendUtil.cpp
  lib/CodeGen/CGStmt.cpp
  lib/CodeGen/CodeGenFunction.cpp
  lib/CodeGen/CodeGenFunction.h
  lib/CodeGen/CodeGenModule.cpp
  lib/CodeGen/CodeGenPGO.cpp
  lib/Driver/Tools.cpp
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGen/Inputs/pgotest.profraw
  test/CodeGen/pgo-instrumentation.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15829.45929.patch
Type: text/x-patch
Size: 10695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160126/ea35e284/attachment-0001.bin>


More information about the cfe-commits mailing list