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

Zhang via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 8 19:59:21 PST 2021


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&F ....) and re-create my RNG each time doesn't preserve its internal state, but using run(Module& 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>


More information about the llvm-dev mailing list