[PATCH] D17622: [PGO] clang cc1 option change to enable IR level instrumenation

Rong Xu via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 25 14:07:01 PST 2016


xur created this revision.
xur added reviewers: davidxl, silvas, justinruggles.
xur added subscribers: cfe-commits, xur, mcrosier, davidxl, slingn.

This patch expands cc1 option -fprofile-instrument= with three new values:
(1) -fprofile-instrument=llvm
This enables IR PGO instrumentation.
(2) -fprofile-instrument=llvm-use
This enables PGO use compilation using IR level profiles. The profile is specified by -fprofile-instrument-path= (cc1) option.
(3) -fprofile-instrument=clang-use
This enables PGO use compilation using clang profiles. This replaces current cc1 option -fprofile-instr-use=. The profile is specified by -fprofile-instrument-path= (cc1) option.

Some tests are modified due to the -fprofile-instr-use= option change.
A new test is added to test IR profile compilation.
test/CodeGen/pgo-instrumentation.c

Original discussion is in http://reviews.llvm.org/D15829.

http://reviews.llvm.org/D17622

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/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: D17622.49113.patch
Type: text/x-patch
Size: 22569 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160225/7fece3e2/attachment-0001.bin>


More information about the cfe-commits mailing list