This is an archive of the discontinued LLVM Phabricator instance.

Let .llvm_bb_addr_map section use the same unique id as its associated .text section.
ClosedPublic

Authored by rahmanl on Nov 25 2020, 10:10 AM.

Details

Summary

Currently, llvm_bb_addr_map sections are generated per section names because we use
the LinkedToSymbol argument of getELFSection. This will cause the address map tables of functions
grouped into the same section when -function-sections=true -unique-section-names=false which is not
the intended behaviour. This patch lets the unique id of every .text section propagate to the associated
.llvm_bb_addr_map section.

Diff Detail

Event Timeline

rahmanl created this revision.Nov 25 2020, 10:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 25 2020, 10:10 AM
rahmanl updated this revision to Diff 307652.Nov 25 2020, 10:21 AM
  • Add comment.
rahmanl published this revision for review.Nov 25 2020, 10:23 AM
rahmanl added a subscriber: grimar.
MaskRay added inline comments.Nov 25 2020, 11:13 AM
llvm/test/CodeGen/X86/basic-block-sections-labels.ll
2–3

For FileCheck options, -- is more common.

32–61

Append {{$}} and try aligning the start of .section

34

What happens with the whitespace change?

45

Append {{$}} to show that ,unique is not used

Yes that .stack_sizes needs a similar fix. @grimar or I can fix it.

rahmanl updated this revision to Diff 308434.Nov 30 2020, 11:28 AM
  • Add {{$}} to the checks.
rahmanl updated this revision to Diff 308436.Nov 30 2020, 11:33 AM
  • Add {{$}} to the checks.
rahmanl marked 3 inline comments as done.Nov 30 2020, 11:34 AM
rahmanl marked an inline comment as done.Nov 30 2020, 11:36 AM

Thank you for the comments @MaskRay . Are there any style guidelines for the test files? I wasn't able to find anything online.

MaskRay accepted this revision.Nov 30 2020, 12:13 PM

Thank you for the comments @MaskRay . Are there any style guidelines for the test files? I wasn't able to find anything online.

Thanks for the update. There is no official style guideline. I just improved my way adding tests by learning from others who are nitpicking (commendatory term here!) on tests.
I requested {{$}} because the section directive may have ,unique,N suffixes and without {{$}} you could not check that no ,unique,N occurred.

This revision is now accepted and ready to land.Nov 30 2020, 12:13 PM
This revision was landed with ongoing or failed builds.Dec 1 2020, 9:30 AM
This revision was automatically updated to reflect the committed changes.
grosbach removed a subscriber: grosbach.