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

Ejjeh, Adel via llvm-dev llvm-dev at lists.llvm.org
Thu Dec 3 09:42:59 PST 2020


Sorry I forgot to reply. I figured it out shortly after sending out my email that I can use FunctionAnalysisManagerModuleProxy to get a FunctionAnalysisManager from the ModuleAnalysisManager.

-Adel

From: Arthur Eubanks <aeubanks at google.com>
Date: Wednesday, November 11, 2020 at 2:02 PM
To: Ejjeh, Adel <aejjeh at illinois.edu>
Cc: LLVM Dev <llvm-dev at lists.llvm.org>
Subject: Re: [llvm-dev] Accessing Function analyses in a Module pass with the new pass manager
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<mailto: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<mailto:aejjeh at illinois.edu> | adel.ejjeh at gmail.com<mailto:adel.ejjeh at gmail.com>
Zoom: https://illinois.zoom.us/my/aejjeh

_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto: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/20201203/974de114/attachment.html>


More information about the llvm-dev mailing list