This patch includes the passmanagerbuilder change that enables IR level PGO instrumentation. It adds two passmanagerbuilder options:
which is primary for debug purpose (or called directly from opt).
It adds two fields in class PassManagerBuilder:
which specifies profile name for generation and use passes, respectively.
In PassManagerBuilder::populateModulePassManager(), it adds a preinstrumenation inline pass if IR level instrumentation is enabled. It then calls the profile generation or use pass as the option specified.