SamplePGO format file changes that broke create_llvm_prof

Some recent changes to the sample profile file broke the create_llvm_prof tool that converts Perf profiles (

The main issue with the tool was that it used its own implementation of the profile writer, so it got out of sync when the compiler changed. I’ve made changes to it to prevent future compatibility problems. Instead of implementing its own writer, the tool now uses LLVM’s ProfileData library to write the profile.

The conversion tool can now generate the exact format used by the compiler you are using, and it can also write in any format supported by LLVM’s ProfileData writers.

To configure the tool, you now pass --with-llvm to configure. This flag takes as input the path to llvm-config, which is used to know where LLVM’s headers and libraries are. It supports both static and shared libraries.

Please let me know, or file bugs, if anything is not working as expected.

Thanks. Diego.