Dominic Chen via llvm-dev
2020-Jan-24 21:55 UTC
[llvm-dev] Module::createRNG() and new PassManager
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)? Please CC me on responses. Thanks, Dominic
Fedor Sergeev via llvm-dev
2020-Jan-24 22:15 UTC
[llvm-dev] Module::createRNG() and new PassManager
Dominic, 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 :) regards, Fedor. On 1/25/20 12:55 AM, Dominic Chen via llvm-dev wrote:> 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)? > > Please CC me on responses. > > Thanks, > > Dominic > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Eric Christopher via llvm-dev
2020-Jan-25 00:04 UTC
[llvm-dev] Module::createRNG() and new PassManager
Agreed, that interface doesn't exist anymore so trying to update it is up to you :) -eric On Fri, Jan 24, 2020 at 2:15 PM Fedor Sergeev via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Dominic, > > 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 :) > > regards, > Fedor. > > On 1/25/20 12:55 AM, Dominic Chen via llvm-dev wrote: > > 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)? > > > > Please CC me on responses. > > > > Thanks, > > > > Dominic > > > > > > > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200124/cf61710f/attachment-0001.html>
Dominic Chen via llvm-dev
2020-Jan-25 00:29 UTC
[llvm-dev] [Resend] Re: Module::createRNG() and new PassManager
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> On Jan 24, 2020, at 5:15 PM, Fedor Sergeev <fedor.sergeev at azul.com> wrote: > > Dominic, > > 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 :) > > regards, > Fedor. > > On 1/25/20 12:55 AM, Dominic Chen via llvm-dev wrote: >> 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)? >> >> Please CC me on responses. >> >> Thanks, >> >> Dominic >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >