This is an archive of the discontinued LLVM Phabricator instance.

[WIP] Changing CG Profile to relocations based.
AbandonedPublic

Authored by ayermolo on May 26 2021, 3:46 PM.

Details

Summary

This patch combines three patches

  1. LLD
  2. objdump
  3. LLVM.

This is for illustrative purposes, for post on llvm-dev, if it is agreed this is the direction we want to go will break it up in to three different patches.

Changed CG profile symbol index information to be encoded in relocations. This allows post processing tools like strip to be used on object files while preserving correct symbol indices.
Initial pathfinding done by @modimo.

Diff Detail

Event Timeline

ayermolo created this revision.May 26 2021, 3:46 PM
ayermolo requested review of this revision.May 26 2021, 3:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2021, 3:46 PM
ayermolo edited the summary of this revision. (Show Details)May 26 2021, 3:50 PM
ayermolo edited the summary of this revision. (Show Details)
ayermolo added a subscriber: modimo.
MaskRay added inline comments.May 26 2021, 5:20 PM
lld/ELF/InputFiles.cpp
674

delete braces around one-line simple statements

llvm/tools/llvm-readobj/ELFDumper.cpp
1857

the loop should be skipped if DotCGProfileSecIndex is zero

jhenderson added inline comments.May 27 2021, 12:49 AM
llvm/tools/llvm-readobj/ELFDumper.cpp
1777

i -> I

6740

Fix clang-tidy warnings around here.

MaskRay requested changes to this revision.Jun 24 2021, 7:33 PM

This can be abandoned now.

This revision now requires changes to proceed.Jun 24 2021, 7:33 PM