This is a modified version of commit b374423304a8 by Arthur (https://reviews.llvm.org/D143424).
Here we invoke to the pass independent of PGOOPT. We now check if the profile is available through the program summary.
This ensures CHR is called in distributed ThinLTO BE compilation (where PGOOPT might not be created).