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