[PATCH] D159146: [BasicBlockSections] Introduce a new version for basic block sections profile.

Rahman Lavaee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 10:49:29 PDT 2023


rahmanl created this revision.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
rahmanl updated this revision to Diff 554518.
rahmanl added a comment.
rahmanl edited the summary of this revision.
rahmanl retitled this revision from "Introduce the basic block sections profile version 1." to "[BasicBlockSections] Introduce a new version for basic block sections profile.".
rahmanl edited the summary of this revision.
rahmanl updated this revision to Diff 554758.
rahmanl updated this revision to Diff 554771.
rahmanl updated this revision to Diff 554778.
rahmanl edited the summary of this revision.
rahmanl added reviewers: tmsriram, shenhan.
rahmanl added subscribers: amharc, dhoekwater.
rahmanl published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

clang-format.


rahmanl added a comment.

nit.


rahmanl added a comment.

Polish the tests.


rahmanl added a comment.

cleanup.


This patch introduces a new version for the basic block sections profile as was requested in D158442 <https://reviews.llvm.org/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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159146

Files:
  llvm/include/llvm/CodeGen/BasicBlockSectionsProfileReader.h
  llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp
  llvm/test/CodeGen/X86/basic-block-sections-clusters-error.ll
  llvm/test/CodeGen/X86/basic-block-sections-clusters.ll
  llvm/test/CodeGen/X86/basic-block-sections-cold.ll
  llvm/test/CodeGen/X86/basic-block-sections-list.ll
  llvm/test/CodeGen/X86/basic-block-sections-module1.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159146.554778.patch
Type: text/x-patch
Size: 24419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230830/f6b98ad2/attachment.bin>


More information about the llvm-commits mailing list