[PATCH] D29512: [PGO] Directory name stripping in global identifier for static functions

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 13:36:00 PST 2017

tejohnson added a comment.

> (2) the stripping only applies to getPGOFuncName. This can create inconsistency in thin-lto's static promotion, which in turn causes problems in thin-lto's indirect-call-promotion (missing targets).

Slight correction - it doesn't affect ThinLTO static promotion (which uses the module hash not the guid). It affects the ThinLTO indirect call promotion since the PGO name needs to match the guid used in the index.

Comment at: lib/IR/Globals.cpp:38
+    cl::desc("Strip specified level of directory name from source paths in "
+             "the profile counter names for static functions."));
It isn't just profile counter names. "in the global identifier for static functions". 

Comment at: lib/ProfileData/InstrProf.cpp:31
 static cl::opt<bool> StaticFuncFullModulePrefix(
+    "static-func-full-module-prefix", cl::init(true),
Should this one be removed, is it useful with the new option?


More information about the llvm-commits mailing list