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

2016-03-02 Thread Rong Xu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL262515: [PGO] Change profile use cc1 option to handle IR level profiles (authored by xur). Changed prior to commit: http://reviews.llvm.org/D17737?vs=49655&id=49664#toc Repository: rL LLVM http://re

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

2016-03-02 Thread David Li via cfe-commits
davidxl accepted this revision. davidxl added a comment. lgtm http://reviews.llvm.org/D17737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-03-02 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 49655. xur added a comment. Integrated with Sean's review comments. -Rong http://reviews.llvm.org/D17737 Files: include/clang/Driver/CC1Options.td include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def include/clang/Frontend/CodeGenO

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

2016-03-02 Thread Sean Silva via cfe-commits
silvas added a comment. I agree, David's suggestion has simplified things. This LGTM (with a couple nits) but I'll let David give the final approval. Comment at: lib/CodeGen/CodeGenModule.cpp:153 @@ +152,3 @@ + if (CodeGenOpts.hasProfileClangUse()) { +assert(!CodeGenOpts.P

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

2016-03-02 Thread Rong Xu via cfe-commits
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 check

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

2016-03-01 Thread David Li via cfe-commits
davidxl added a comment. I think we just need one cc1 option -fprofile-instrument-use-path=<>. An overloaded setPGOInstrumenter method can peak at the profile header and get the Profile flavor. http://reviews.llvm.org/D17737 ___ cfe-commits maili

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

2016-03-01 Thread Rong Xu via cfe-commits
xur marked an inline comment as done. Comment at: lib/CodeGen/CodeGenModule.cpp:154 @@ +153,3 @@ +assert(!CodeGenOpts.ProfileInstrumentUsePath.empty() && + "Need to explicitly specify the profile name."); +auto ReaderOrErr = llvm::IndexedInstrProfReader::create(

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

2016-02-29 Thread Sean Silva via cfe-commits
silvas added a comment. Some comments but otherwise feel free to commit. Comment at: lib/CodeGen/CodeGenModule.cpp:154 @@ +153,3 @@ +assert(!CodeGenOpts.ProfileInstrumentUsePath.empty() && + "Need to explicitly specify the profile name."); +auto ReaderOrErr = l

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

2016-02-29 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 49444. xur marked 2 inline comments as done. xur added a comment. Integrated Sean's review suggestions. -Rong http://reviews.llvm.org/D17737 Files: include/clang/Driver/CC1Options.td include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.d

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

2016-02-29 Thread Sean Silva via cfe-commits
silvas accepted this revision. silvas added a comment. This revision is now accepted and ready to land. Thanks! http://reviews.llvm.org/D17737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

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

2016-02-29 Thread Rong Xu via cfe-commits
xur marked 4 inline comments as done. Comment at: lib/Frontend/CompilerInvocation.cpp:378 @@ -377,1 +377,3 @@ +enum PGOInstrumentor { ProfileUnknown, ProfileNone, ProfileClang, ProfileLLVM }; +static PGOInstrumentor getPGOInstrumentor(StringRef S) { silvas wrot

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

2016-02-29 Thread Sean Silva via cfe-commits
silvas added a comment. Thanks, this is looking good. I have some naming suggestions and nits, but the overall content of the patch LGTM. Comment at: include/clang/Driver/CC1Options.td:286 @@ +285,3 @@ +def fprofile_instrument_usepath_EQ : +Joined<["-"], "fprofile-instrumen

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

2016-02-29 Thread Rong Xu via cfe-commits
xur created this revision. xur added reviewers: davidxl, silvas, bogner. xur added subscribers: davidxl, xur, cfe-commits. This patch takes the suggestion by Sean Silva in https://reviews.llvm.org/D17622 to decouple cc1 option from driver level option. -fprofile-instr-use={} is now a driver only