[PATCH] D17737: [PGO] change profile use cc1 option

Rong Xu via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 2 10:41:32 PST 2016


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

I think David's suggestion to use one cc1 option -fprofile-instrument-use-path is a very good idea.
I update the patch to get rid of -fprofille-instrument-use.

The profile kind is now set by checking the profile header. I use a separated function (instead of using the overloaded name of setPGOInstrumentor()).

The assertion in lib/CodeGen/CodeGenModule.cpp:153 might not be needed. As Profilekind CodeGenOpts is getting from CodeGenOpts.ProfileInstrumentUsePath, so it should not be empty. But I keep it just in case.


http://reviews.llvm.org/D17737

Files:
  include/clang/Driver/CC1Options.td
  include/clang/Driver/Options.td
  include/clang/Frontend/CodeGenOptions.def
  include/clang/Frontend/CodeGenOptions.h
  lib/CodeGen/BackendUtil.cpp
  lib/CodeGen/CodeGenModule.cpp
  lib/Driver/Tools.cpp
  lib/Frontend/CMakeLists.txt
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGen/Inputs/pgotestclang.profraw
  test/CodeGen/Inputs/pgotestir.profraw
  test/CodeGen/pgo-instrumentation.c
  test/Driver/clang_f_opts.c
  test/Profile/c-captured.c
  test/Profile/c-counter-overflows.c
  test/Profile/c-general.c
  test/Profile/c-outdated-data.c
  test/Profile/c-unprofiled-blocks.c
  test/Profile/c-unprofiled.c
  test/Profile/cxx-lambda.cpp
  test/Profile/cxx-rangefor.cpp
  test/Profile/cxx-templates.cpp
  test/Profile/objc-general.m
  test/Profile/profile-does-not-exist.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17737.49647.patch
Type: text/x-patch
Size: 22664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160302/207e3691/attachment-0001.bin>


More information about the cfe-commits mailing list