This is an archive of the discontinued LLVM Phabricator instance.

[PGO] change the interface for createPGOFuncNameMetadata()
ClosedPublic

Authored by xur on Apr 22 2016, 1:32 PM.

Details

Summary

This patch changes the interface for createPGOFuncNameMetadata() where we add another PGOFuncName argument. This is needed because clang instrumentation and IR instrumentation use slight different prefix in PGOFuncName if the source file name containing directories:
(1) clang instrumentation strips out all the directories.
(2) IR instrumentation keeps the directories path.
To accommodate both usage, we need to have this extra argument.

Diff Detail

Repository
rL LLVM

Event Timeline

xur updated this revision to Diff 54709.Apr 22 2016, 1:32 PM
xur retitled this revision from to [PGO] change the interface for createPGOFuncNameMetadata().
xur updated this object.
xur added a reviewer: davidxl.
xur added subscribers: llvm-commits, anemet, xur.
davidxl accepted this revision.Apr 22 2016, 2:01 PM
davidxl edited edge metadata.

lgtm

lib/Transforms/Instrumentation/PGOInstrumentation.cpp
735 ↗(On Diff #54709)

I suggest changing FuncInfo.FuncName to FuncInfo.PGOFuncName for clarity, but that can be done later.

This revision is now accepted and ready to land.Apr 22 2016, 2:01 PM
This revision was automatically updated to reflect the committed changes.

As a follow-on change, is there a way to add a testcase for these changes?