Going back years Google has been working on AutoFDO optimizations for GCC and then last month they released similar support got LLVM. Google has now open-sourced their complete AutoFDO tool-chain.
From their new AutoFDO GitHub repository, "The repository contains a tool to convert perf.data profile to AutoFDO profile that can be used by GCC and LLVM. Each compiler is supported by a different tool. For GCC, use 'create_gcov'. For LLVM, use 'create_llvm_prof'. The two tools have compatible command line flags. However, the outputs are incompatible. You cannot use the profile generated for GCC in LLVM and vice-versa."
Dehao Chen announced the open-sourcing of all their AutoFDO work to the GCC developers. More details can be found via the Wiki.