This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Add blocks order kind to YAML profile header
ClosedPublic

Authored by Amir on Jul 24 2023, 3:28 PM.

Details

Reviewers
rafauler
maksfb
Group Reviewers
Restricted Project
Commits
rG1e0d08e87227: [BOLT] Add blocks order kind to YAML profile header
Summary

Specify blocks order used in YAML profile. Needed to ensure profile backwards
compatibility with pre-D155514 DFS order by default.

Diff Detail

Event Timeline

Amir created this revision.Jul 24 2023, 3:28 PM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Amir requested review of this revision.Jul 24 2023, 3:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 3:28 PM
maksfb added inline comments.Jul 24 2023, 4:17 PM
bolt/include/bolt/Profile/ProfileYAMLMapping.h
27

Since we only use DFS and non-DFS values internally, perhaps we can have the same boolean value in YAML?

Amir updated this revision to Diff 543763.Jul 24 2023, 5:53 PM

Use IsDFSOrder bool value

Amir marked an inline comment as done.Jul 24 2023, 5:53 PM

Will the test work on non-linux systems? If the asm is not necessary, maybe use C?

Amir updated this revision to Diff 543790.Jul 24 2023, 7:30 PM

Switch test to C

Amir added a comment.Jul 24 2023, 7:32 PM

Will the test work on non-linux systems? If the asm is not necessary, maybe use C?

Assembly should work on any system, but switch to C to ensure portability.

maksfb accepted this revision.Jul 24 2023, 8:00 PM
This revision is now accepted and ready to land.Jul 24 2023, 8:00 PM
Amir updated this revision to Diff 543809.Jul 24 2023, 9:01 PM

clang-format

This revision was automatically updated to reflect the committed changes.