[PATCH] D18623: [PGO] refactor PGOFuncName meta data code to be used in clang

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 23:10:15 PDT 2016


davidxl added a comment.

sort the header file order properly.


================
Comment at: include/llvm/ProfileData/InstrProf.h:258
@@ +257,3 @@
+/// Create the PGOFuncName meta data if PGOFuncName is different from
+/// function's raw name. This should only apply to internal linkage functions
+/// only. Return true if the meta data is written out, and false if not.
----------------
apply to internal linkage functions declared by user only.

================
Comment at: lib/ProfileData/InstrProf.cpp:101
@@ -100,4 +100,3 @@
 
-  // InLTO mode. First check if these is a meta data.
-  MDNode *MD = F.getMetadata("PGOFuncName");
-  if (MD != nullptr) {
+  // InLTO mode. First check if there is a meta data.
+  if (MDNode *MD = getPGOFuncNameMetadata(F)) {
----------------
In LTO mode or When InLTO is true


http://reviews.llvm.org/D18623





More information about the llvm-commits mailing list