[llvm-dev] Accessing Function analyses in a Module pass with the new pass manager

Arthur Eubanks via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 11 12:02:25 PST 2020


You shouldn't be running a non-analysis pass from another pass, and the NPM
doesn't allow for that. If you want to do some transforms, use some utility
function. For example, use SplitAllCriticalEdges() instead of running
BreakCriticalEdgesPass.

Does that answer your question? What exactly are you trying to do?

On Wed, Nov 11, 2020 at 7:45 AM Ejjeh, Adel via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hello
>
>
>
> With the legacy pass manager, we could invoke a Function Pass within the
> runOnModule() of a Module Pass by simply passing the Function reference to
> the getAnalysis<>() method. Can the same be achieved using the new Pass
> Manager? I am writing a Module Pass which requires to access analyses for
> the different functions, and I need the new pass manager because I need
> different copies of the same analysis to be valid at the same time, for
> different functions in the module (my understanding was that the new pass
> manager can do that whereas the legacy pass manager would only keep the
> last instance that was invoked).
>
>
>
> Thanks
>
> -Adel
>
> --
>
> Adel Ejjeh
>
> PhD Candidate | Computer Science
>
> University of Illinois at Urbana Champaign
>
> Email: aejjeh at illinois.edu | adel.ejjeh at gmail.com
>
> Zoom: https://illinois.zoom.us/my/aejjeh
>
>
> _______________________________________________
> 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/20201111/ac1f3354/attachment.html>


More information about the llvm-dev mailing list