[PATCH] D154020: [BOLT] Introduce Rewriter interface
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 05:50:48 PDT 2023
Amir added inline comments.
================
Comment at: bolt/include/bolt/Rewrite/RewriteManager.h:48
+
+ /// Use this static method to access global RewriteManager instance.
+ static RewriteManager *getManager();
----------------
jobnoorman wrote:
> Amir wrote:
> > Why a global instance and not a RewriteInstance member variable?
> I would also recommend to not make this a singleton. It is (in theory) possible to have multiple `RewriteInstance` objects but having a global `RewriteManager` would make this (more) difficult.
Yes, in fact, llvm-boltdiff constructs two RI objects.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154020/new/
https://reviews.llvm.org/D154020
More information about the llvm-commits
mailing list