<div dir="ltr"><div>Hi,</div><div><br></div><div>I have 4 questions:</div><div>1. In legacy pass manager, we have following sequence of code in PassManagerBuilder.cpp</div><div><br></div><div>PM.add( some_function_pass_1() )</div><div>
PM.add( some_function_pass_2() ) <br></div><div><br></div><div>why is it that we add function pass to a module pass manager? And does these 2 statements create 2 function pass managers ?</div><div><br></div><div>2.  In new pass manager, the above code would look something like this.</div><div>FunctionPassManager FPM;</div><div>FPM.add(  some_function_pass_1() 

)</div><div>
FPM.add(  some_function_pass_2() 

) <br></div><div>MPM.add( std::move(FPM) )</div><div><br></div><div>Now is this code exactly identical to code in legacy pass manager shown above or how is it different?</div><div><br></div><div>3. Can adaptors be used in custom pass to change the schedule of pipeline?</div><div><br></div><div>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)<br></div><div><br></div><div>Regards</div><div>Sushant<br></div></div>