r267224 - PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name
Rong Xu via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 22 14:19:05 PDT 2016
Author: xur
Date: Fri Apr 22 16:19:05 2016
New Revision: 267224
URL: http://llvm.org/viewvc/llvm-project?rev=267224&view=rev
Log:
PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name
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 pass.
Differential Revision: http://reviews.llvm.org/D18624
Modified:
cfe/trunk/lib/CodeGen/CodeGenPGO.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenPGO.cpp?rev=267224&r1=267223&r2=267224&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenPGO.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenPGO.cpp Fri Apr 22 16:19:05 2016
@@ -43,6 +43,8 @@ void CodeGenPGO::setFuncName(StringRef N
void CodeGenPGO::setFuncName(llvm::Function *Fn) {
setFuncName(Fn->getName(), Fn->getLinkage());
+ // Create PGOFuncName meta data.
+ llvm::createPGOFuncNameMetadata(*Fn, FuncName);
}
namespace {
More information about the cfe-commits
mailing list