[PATCH] D15829: [PGO] Clang Option that enables IR level PGO instrumentation
David Li via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 18 10:07:52 PST 2016
davidxl added inline comments.
================
Comment at: lib/CodeGen/CodeGenModule.cpp:150
@@ -149,2 +149,3 @@
- if (!CodeGenOpts.InstrProfileInput.empty()) {
+ if (!CodeGenOpts.hasProfileIRInstr() &&
+ !CodeGenOpts.InstrProfileInput.empty()) {
----------------
Better to use if (CodeGenOpts.hasProfileClangInstr() && ..)
================
Comment at: lib/Driver/Tools.cpp:3201
@@ +3200,3 @@
+// Set the profile kind if it's not the default clang kind.
+static void setProfileKindFlag(ArgStringList &CmdArgs,
+ std::string ProfileName) {
----------------
I don't quite like this change in the driver. I think the right thing to do is:
1) for profile use case, there is no need to pass -fprofile-instrument=<...> FE option from the driver
2) The profileInstrKind determination needs to happen in FE (not driver) by peeking into the passed in profile data.
http://reviews.llvm.org/D15829
More information about the cfe-commits
mailing list