Stanislav Manilov via llvm-dev
2016-Feb-11 17:49 UTC
[llvm-dev] Writing an LLVM Pass that depends on mem2reg
Hello, I am used to specifying dependence on other LLVM passes in the `getAnalysisUsage(AnalysisUsage &)` method of my pass. However, it doesn't seem that there is a header file that exposes the `mem2reg` pass - it is implemented in `Mem2Reg.cpp` as a wrapper. Is there an easy way to reuse this pass, or should I, in essence, duplicate `Mem2Reg.cpp` in my project? Cheers, - Stan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160211/d9d54ed9/attachment.html>
Mehdi Amini via llvm-dev
2016-Feb-11 17:54 UTC
[llvm-dev] Writing an LLVM Pass that depends on mem2reg
> On Feb 11, 2016, at 9:49 AM, Stanislav Manilov via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello, > > I am used to specifying dependence on other LLVM passes in the `getAnalysisUsage(AnalysisUsage &)` method of my pass. However, it doesn't seem that there is a header file that exposes the `mem2reg` pass - it is implemented in `Mem2Reg.cpp` as a wrapper.Usually dependencies are expressed toward *analyses* and not toward other transformations. It is the responsibility of the pass pipeline building to order transformations. (hope I haven't misunderstood your question) -- Mehdi> > Is there an easy way to reuse this pass, or should I, in essence, duplicate `Mem2Reg.cpp` in my project? > > Cheers, > - Stan > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Stanislav Manilov via llvm-dev
2016-Feb-11 18:39 UTC
[llvm-dev] Writing an LLVM Pass that depends on mem2reg
Oh, I see, that makes a lot of sense. How do I build the pass pipeline? On Thu, Feb 11, 2016 at 5:54 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:> > On Feb 11, 2016, at 9:49 AM, Stanislav Manilov via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > > > Hello, > > > > I am used to specifying dependence on other LLVM passes in the > `getAnalysisUsage(AnalysisUsage &)` method of my pass. However, it doesn't > seem that there is a header file that exposes the `mem2reg` pass - it is > implemented in `Mem2Reg.cpp` as a wrapper. > > Usually dependencies are expressed toward *analyses* and not toward other > transformations. > > It is the responsibility of the pass pipeline building to order > transformations. > > (hope I haven't misunderstood your question) > > -- > Mehdi > > > > > > Is there an easy way to reuse this pass, or should I, in essence, > duplicate `Mem2Reg.cpp` in my project? > > > > Cheers, > > - Stan > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > http://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/20160211/cc7d5ddd/attachment.html>