This is an archive of the discontinued LLVM Phabricator instance.

[profile][test][NFC] Simplify test code for prof_avoid_relocs
AbandonedPublic

Authored by paulkirth on Jan 13 2023, 2:07 PM.

Details

Reviewers
alexgatea
Summary

Some of the boiler-plate IR for profile data the test matched against
were unnecessary for this test, which is intended to ensure that making
private aliases for use in profile data works correctly for each linkage
type when the data target function is not in a comdat.

Primarily this test needs to check that when profdata is created for certain
linkage types, that it uses the new private alias in place of the public
interposable symbol.

Diff Detail

Event Timeline

paulkirth created this revision.Jan 13 2023, 2:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2023, 2:07 PM
Herald added a subscriber: wenlei. · View Herald Transcript
paulkirth requested review of this revision.Jan 13 2023, 2:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2023, 2:07 PM
paulkirth added inline comments.Jan 13 2023, 2:10 PM
llvm/test/Transforms/PGOProfile/prof_avoid_relocs.ll
10–13

I went back and forth on whether we need the checks on __profc* at all, and if we still want to try to match on the section. I think we should still be ok without them, but I'm not 100%. I don't think we can go smaller than this.

alexgatea accepted this revision.Jan 13 2023, 2:12 PM

LGTM. My main previous concern has been addressed by the {{.*}}

This revision is now accepted and ready to land.Jan 13 2023, 2:12 PM
paulkirth abandoned this revision.Jan 18 2023, 2:15 PM

Since https://reviews.llvm.org/D137982 was reverted, I will update this test with these simplifications when I reland it.