[PATCH] D21823: [Driver] Add flags for enabling both types of PGO Instrumentation

David Li via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 1 14:22:50 PDT 2016

davidxl added inline comments.

Comment at: include/clang/Driver/Options.td:507
@@ +506,3 @@
+    Group<f_Group>, Flags<[DriverOption]>, MetaVarName<"<file>">,
+    HelpText<"Set <file> to be the default profile output file (overridden by LLVM_PROFILE_FILE env var)">;
+def fpgo_apply_EQ : Joined<["-"], "fpgo-apply=">,
Why is it called 'default' output? The default output is the one used why user does not specify any name.

Why not just -fpgo-train-output=... ?

Comment at: lib/Driver/Tools.cpp:3560
@@ +3559,3 @@
+    if (PGOTrainArg->getOption().matches(options::OPT_fpgo_train_EQ)) {
+      if (StringRef(PGOTrainArg->getValue()) == "source-cfg")
+        CmdArgs.push_back("-fprofile-instrument=clang");
I think it is better to make the selector  'source' vs 'cfg'.    




More information about the cfe-commits mailing list