[PATCH] D17737: [PGO] change profile use cc1 option
Rong Xu via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 29 18:02:58 PST 2016
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 wrote:
> Can we reuse the enum used for CodeGenOpts? Please add a comment if not.
this is a very good suggestion. I'll change the code as you suggested.
================
Comment at: lib/Frontend/CompilerInvocation.cpp:533
@@ +532,3 @@
+ Args.getLastArgValue(OPT_fprofile_instrument_path_EQ);
+ Opts.InstrProfileInput =
+ Args.getLastArgValue(OPT_fprofile_instrument_usepath_EQ);
----------------
silvas wrote:
> Maybe consider renaming these variables in a separate patch. The current naming is pretty confusing since it makes it seems like InstrProfileOutput mirrors InstrProfileInput, but they are totally unrelated. Maybe `InstrProfileDefaultProfrawPath` and `InstrProfileUsePath`, respectively.
>
> Maybe in this patch rename `InstrProfileInput` to `ProfileInstrumentUsePath` to match the option name?
Will change the name InstrProfileInput to ProfileInstrumentUsePath in this path.
I will change Opts.InstrProfileOutput to InstrProfileDefaultProfrawPath in a separated patch.
http://reviews.llvm.org/D17737
More information about the cfe-commits
mailing list