[PATCH] D154020: [BOLT] Introduce Rewriter interface

Maksim Panchenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 17:04:32 PDT 2023


maksfb created this revision.
maksfb added reviewers: Elvina, treapster, jobnoorman, yota9, Amir, ayermolo, rafauler.
Herald added a project: All.
maksfb requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Introduce the Rewriter interface to handle updates for various
types of metadata 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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154020

Files:
  bolt/include/bolt/Rewrite/RewriteInstance.h
  bolt/include/bolt/Rewrite/RewriteManager.h
  bolt/include/bolt/Rewrite/RewriterBase.h
  bolt/include/bolt/Rewrite/Rewriters.h
  bolt/lib/Rewrite/CMakeLists.txt
  bolt/lib/Rewrite/RewriteInstance.cpp
  bolt/lib/Rewrite/RewriteManager.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154020.535567.patch
Type: text/x-patch
Size: 9792 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230629/400bc2dc/attachment.bin>


More information about the llvm-commits mailing list