This is an archive of the discontinued LLVM Phabricator instance.

[PGO] Comment how function pointers for indirect calls are mapped to function names
ClosedPublic

Authored by anemet on Mar 26 2016, 2:07 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

anemet updated this revision to Diff 51714.Mar 26 2016, 2:07 AM
anemet retitled this revision from to [PGO] Comment how function pointers for indirect calls are mapped to function names.
anemet updated this object.
anemet added reviewers: bogner, davidxl.
anemet added a subscriber: llvm-commits.
davidxl accepted this revision.Mar 26 2016, 9:07 AM
davidxl edited edge metadata.

lgtm

include/llvm/ProfileData/InstrProfData.inc
76 ↗(On Diff #51714)

After this is committed, please update the copy of this file in compiler-rt as well.

This revision is now accepted and ready to land.Mar 26 2016, 9:07 AM
This revision was automatically updated to reflect the committed changes.
anemet added inline comments.Mar 28 2016, 11:43 AM
include/llvm/ProfileData/InstrProfData.inc
76 ↗(On Diff #51714)

Done in r264612.

This should be updated again with the version using C style comment.

David

This should be updated again with the version using C style comment.

Done in r264615.

Is

llvm/trunk/include/llvm/ProfileData/InstrProfData.inc
78

Is FunctionPointer still used by the runtime? @davidxl @vsk

I can only find one reference __llvm_get_function_addr, which is a public API.

Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2021, 4:09 PM
Herald added a subscriber: wenlei. · View Herald Transcript
MaskRay added inline comments.Jun 14 2021, 4:11 PM
llvm/trunk/include/llvm/ProfileData/InstrProfData.inc
78

Hmm. It is used by ProfileData/InstrProfReader.cpp

So it seems that value profiling adds quite a bit size overhead to the metadata sections.

davidxl added inline comments.Jun 14 2021, 5:10 PM
llvm/trunk/include/llvm/ProfileData/InstrProfData.inc
78

Right -- it is used by the profile reader to build mapping from func->name so that indirect call target profile can be translated to func names. Changing the llvm-profdata workflow by forcing binary as an input will allow the field to be removed -- but things get complicated with -fPIE build.