[PATCH] D15829: [PGO] Clang Option that enables IR level PGO instrumentation

Sean Silva via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 21 18:36:31 PST 2016


silvas added a comment.

This needs tests showing that the IR gen/use passes get run. Maybe use -debug-pass=Structure like test/CodeGen/thinlto_backend.c?

My biggest concern is the naming and user visible parts. I can't come up with anything better than `-fprofile-ir-instr` TBH. Overall, from a user's perspective, this is really just "perform instrumentation in an alternate way", since "IR" vs "frontend" is really not meaningful for them (there isn't really any meaningful way for use to communicate anything to them about what they should expect the flag to do differently as user-visible behavior). `-fprofile-alternate-instr` doesn't sound any better really.

Any ideas?

Once we expose this as a driver option though we must remain compatible, so it is best to think for a moment about the naming.


================
Comment at: include/clang/Driver/Options.td:457
@@ -455,1 +456,3 @@
+    Flags<[CC1Option]>,
+    HelpText<"Use IR level instrumentation rather the FE implementation">;
 def fcoverage_mapping : Flag<["-"], "fcoverage-mapping">,
----------------
This doesn't seem like useful help text for a user.


http://reviews.llvm.org/D15829





More information about the cfe-commits mailing list