This is an archive of the discontinued LLVM Phabricator instance.

[BasicBlockSections] Introduce a new version for basic block sections profile.
AbandonedPublic

Authored by rahmanl on Aug 29 2023, 4:10 PM.

Details

Reviewers
tmsriram
shenhan
Summary

This patch introduces a new version for the basic block sections profile as was requested in D158442, while keeping backward compatibility for the old version.

The new encoding is as follows:

m <module_name>
f <function_name_1> <function_name_2>... 
c <bb_id_1> <bb_id_2> <bb_id_3>
c <bb_id_4> <bb_id_5>
...

Module name specifier (starting with 'm') is optional and allows distinguishing profiles for internal-linkage functions with the same name. If not specified, profile will be applied to any function with the same name.
Function name specifier (starting with 'f') can specify multiple function name aliases.
Finally, basic block clusters are specified by 'c' and specify the cluster of basic blocks, and the internal order in which they must be placed in the same section.

Diff Detail

Event Timeline

rahmanl created this revision.Aug 29 2023, 4:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2023, 4:10 PM
rahmanl updated this revision to Diff 554518.Aug 29 2023, 4:15 PM

clang-format.

rahmanl edited the summary of this revision. (Show Details)Aug 29 2023, 4:19 PM
rahmanl retitled this revision from Introduce the basic block sections profile version 1. to [BasicBlockSections] Introduce a new version for basic block sections profile..Aug 29 2023, 4:21 PM
rahmanl edited the summary of this revision. (Show Details)Aug 30 2023, 9:38 AM
rahmanl updated this revision to Diff 554771.Aug 30 2023, 10:28 AM

Polish the tests.

rahmanl edited the summary of this revision. (Show Details)Aug 30 2023, 10:47 AM
rahmanl added reviewers: tmsriram, shenhan.
rahmanl added subscribers: amharc, dhoekwater.
rahmanl published this revision for review.Aug 30 2023, 10:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2023, 10:49 AM
rahmanl updated this revision to Diff 554804.Aug 30 2023, 12:44 PM

Fix test.