[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 14:31:09 PDT 2016
xur created this revision.
xur added reviewers: davidxl, bogner, joker.eph.
xur added subscribers: cfe-commits, vsk, xur.
Write out the PGOFuncName meta data if PGOFuncName is different from function's raw name. This should only apply to internal linkage functions. This is to be consumed by indirect-call promotion when called in LTO optimization passes (D17864 under review).
This patch depends on 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]);
+ // Write out 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.52125.patch
Type: text/x-patch
Size: 532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160330/8d7707cf/attachment.bin>
More information about the cfe-commits
mailing list