[llvm-dev] LLVM data structures between modules
Mohannad Ismail via llvm-dev
llvm-dev at lists.llvm.org
Wed Feb 24 12:28:15 PST 2021
Greetings everyone,
I currently have a pass (Pass 2) that does some transformations. What I
want to do is to have a pass (Pass 1) that runs before Pass 2, collects
some IR information, stores it in a data structure and passes the data
structure to Pass 2 so that I can use it for specific transformations. I
think this can be done with getAnalysisUsage, but I'm not sure how. I would
like to know how to do that exactly, if it's possible.
Another thing, and this is the tricky part, is that I want Pass 1 to run on
all the source files I have first before Pass 2 runs and pass a collective
data structure to Pass 2. In other words, I want Pass 1 to run across all
the modules and source files first, collect information, pass it to Pass 2
then Pass 2 runs. Is there a way to tell LLVM to do this type of "double
compilation"?
Hope I was able to explain this well enough. Please let me know if I wasn't
clear or if you have any questions. Thank you very much!
Best regards,
Mohannad Ismail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210224/2a7db428/attachment.html>
More information about the llvm-dev
mailing list