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

Sean Silva via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 29 18:42:34 PST 2016


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 = llvm::IndexedInstrProfReader::create(
----------------
Are we ensuring consistency in the driver? If not, we definitely want to do that.

================
Comment at: lib/Frontend/CompilerInvocation.cpp:381
@@ +380,3 @@
+                               OptSpecifier Id, DiagnosticsEngine &Diags) {
+  if (Id != OPT_fprofile_instrument_EQ && Id != OPT_fprofile_instrument_use_EQ)
+    return;
----------------
I think it would be better to assert that it is one of the two options rather than silently doing nothing.


http://reviews.llvm.org/D17737





More information about the cfe-commits mailing list