Correct me if I'm wrong, but is Module::CreateRNG(Pass *) unusable with
the new PassManager? Since each pass is defined as a
llvm::PassInfoMixIn<DerivedT> instead of inheriting from llvm::Pass, it
doesn't seem possible to obtain the underlying llvm::Pass * from e.g.
llvm::ModuleAnalysisManager. Would it make sense to change the
definition/implementation to Module::CreateRNG(StringRef PassName)?
what is the intended use of this interface? It seems to be unused in llvm repo.
It is not clear to me why is it needed to seed RNG with pass name, but you surely can do that
I only came across this today; I was looking for some built-in
functionality in order to generate random numbers in an IR pass. I
believe the desired goal is to seed with the pass name so that the
behavior is deterministic under the same pass and module ID. I have
uploaded a patch to phabricator, D73390.
Dominic