[PATCH] D12781: PGO IR-level instrumentation infrastructure

David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 11:56:24 PST 2015


davidxl added inline comments.

================
Comment at: include/llvm/Transforms/Instrumentation.h:183
@@ +182,3 @@
+// set the function name and prefix module name for local linkage to avoid
+// the potential name conflict.
+static inline std::string PGOSetFuncName(Module &M, StringRef Name,
----------------
An interface is available in ProfileData/InstrProf.h:

llvm::getPGOFuncName

which is also used by cfe. 

Remove this dup.

================
Comment at: include/llvm/Transforms/Instrumentation.h:210
@@ +209,3 @@
+
+static inline GlobalVariable *PGOCreateFuncNameVar(Module &M, Function &F,
+                                                   std::string FuncName) {
----------------
Similarly llvm::createPGOFuncNameVar will do what you need.

Remove this duplicate.


http://reviews.llvm.org/D12781





More information about the llvm-commits mailing list