[llvm-dev] Adaptors in new pass manager

sushant gokhale via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 9 03:08:09 PST 2020


Hi,

I have 4 questions:
1. In legacy pass manager, we have following sequence of code in
PassManagerBuilder.cpp

PM.add( some_function_pass_1() )
PM.add( some_function_pass_2() )

why is it that we add function pass to a module pass manager? And does
these 2 statements create 2 function pass managers ?

2.  In new pass manager, the above code would look something like this.
FunctionPassManager FPM;
FPM.add(  some_function_pass_1()  )
FPM.add(  some_function_pass_2()  )
MPM.add( std::move(FPM) )

Now is this code exactly identical to code in legacy pass manager shown
above or how is it different?

3. Can adaptors be used in custom pass to change the schedule of pipeline?

4. Can adaptors be used to decide on the sequence of passes to be run such
that sequence yields better results? By deciding I mean searching/trying
out different sequences(like we search for good solutions in machine
learning)

Regards
Sushant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201109/0b83729b/attachment.html>


More information about the llvm-dev mailing list