[PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

Rong Xu via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 30 15:07:30 PDT 2016


xur updated this revision to Diff 52134.
xur added a comment.

sync the change in http://reviews.llvm.org/D18623.


http://reviews.llvm.org/D18624

Files:
  lib/CodeGen/CodeGenPGO.cpp

Index: lib/CodeGen/CodeGenPGO.cpp
===================================================================
--- lib/CodeGen/CodeGenPGO.cpp
+++ lib/CodeGen/CodeGenPGO.cpp
@@ -787,6 +787,11 @@
                             (llvm::InstrProfValueKind)ValueKind,
                             NumValueSites[ValueKind]);
 
+    // Create PGOFuncName meta data.
+    llvm::Function *F = ValueSite->getFunction();
+    if (!llvm::getPGOFuncNameMetadata(*F))
+      llvm::createPGOFuncNameMetadata(*F);
+
     NumValueSites[ValueKind]++;
   }
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18624.52134.patch
Type: text/x-patch
Size: 529 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160330/6179284f/attachment.bin>


More information about the cfe-commits mailing list