[llvm-dev] Where does doInitialization() fit into the new PassManager model?

Zhang via llvm-dev
Tue, 09 Nov 2021 03:59:21 -0000

Hi:
In my legacy pass, I usually use doInitialization() to call Module::createRNG()
to create a RandomNumberGenerator, which my FunctionPass later uses.
How does this model fit into the new PassManager interface? Creating my new pass
as run(Function&amp;F ....) and re-create my RNG each time doesn't
preserve its internal state, but using run(Module&amp; M) seems a bit
overkill to me?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20211109/86a810b5/attachment.html>