[all-commits] [llvm/llvm-project] c9b1f0: [BOLT] Introduce MetadataRewriter interface

maksfb via All-commits all-commits at lists.llvm.org
Thu Jul 6 11:16:47 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c9b1f062887d3837797cbed97847ffc320033121
      https://github.com/llvm/llvm-project/commit/c9b1f062887d3837797cbed97847ffc320033121
  Author: Maksim Panchenko <maks at fb.com>
  Date:   2023-07-06 (Thu, 06 Jul 2023)

  Changed paths:
    A bolt/include/bolt/Rewrite/MetadataManager.h
    A bolt/include/bolt/Rewrite/MetadataRewriter.h
    A bolt/include/bolt/Rewrite/MetadataRewriters.h
    M bolt/include/bolt/Rewrite/RewriteInstance.h
    M bolt/lib/Rewrite/CMakeLists.txt
    A bolt/lib/Rewrite/MetadataManager.cpp
    M bolt/lib/Rewrite/RewriteInstance.cpp

  Log Message:
  -----------
  [BOLT] Introduce MetadataRewriter interface

Introduce the MetadataRewriter interface to handle updates for various
types of auxiliary data stored in a binary file.

To implement metadata processing using this new interface, all metadata
rewriters should derive from the RewriterBase class and implement
one or more of the following methods, depending on the timing of metadata
read and write operations:

  * preCFGInitializer()
  * postCFGInitializer() // TBD
  * preEmitFinalizer()   // TBD
  * postEmitFinalizer()

By adopting this approach, we aim to simplify the RewriteInstance class
and improve its scalability to accommodate new extensions of file formats,
including various metadata types of the Linux Kernel.

Differential Revision: https://reviews.llvm.org/D154020




More information about the All-commits mailing list