[PATCH] D88107: [NewPM] Add callbacks to PassBuilder to run before/after parsing a pass
Yuanfang Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 13:20:52 PDT 2020
ychen added inline comments.
================
Comment at: llvm/include/llvm/Passes/PassBuilder.h:824
+ // Before/after pass parsing callbacks
+ SmallVector<std::function<void(ModulePassManager &)>, 2>
+ ModulePassWillParseCallbacks;
----------------
How about adding a "StringRef Element" as the first callback parameter? I could not think of a concrete use case for it now. But it is more general and canonical. The current interface is restricted to callbacks that do something for every pass.
For the name, why not just use before/after instead of willParse/parsed?
================
Comment at: llvm/unittests/IR/PassBuilderCallbacksTest.cpp:1189
+ int C = Counter++;
+ if (I == 0)
+ I = C;
----------------
assert (I==0); ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88107/new/
https://reviews.llvm.org/D88107
More information about the llvm-commits
mailing list