<div dir="ltr"><div dir="ltr"><div>Hello,</div><div><br></div>I am now working on a project involving profile-guided-optimization. I find the documentation at <a href="http://llvm.org/docs/Passes.html#id49">http://llvm.org/docs/Passes.html#id49</a> named a pass <i>-block-placement</i> to do simple PGO. I am wondering what tool and flags I should use to run this pass.</div><div dir="ltr"><br></div><div>I have found that this pass is located in llvm-src/lib/CodeGen/MachineBlockPlacement.cpp, and <i>MachineFunctionPass</i> cannot be run from <i>opt</i> or <i>bugpoint</i>. According to the manual page of <i>llc</i>, I cannot directly use <i>-block-placement, instead</i> using <i>-print-after=block-placement</i> or <i>-print-before=block-placement.</i> However, using these flags have no different results. I also used <i>--debug-pass=Executions</i> to <i>llc</i>, and saw <i>-block-placement</i> passed as an argument, but it was not executed. I am wondering if the pass -<i>block-placement</i> runs automatically, and I should give other pgo-file flags to trigger it, or the pass can run individually.</div><div><br></div><div>Thanks,</div><div>Yirui</div></div>