I have several questions regarding Profile-Guided Optimization (PGO) on Apple platforms (macOS and iOS).
Is there a way to sampling PGO (https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers) on Apple platforms? Official Clang implementation expects Linux perf profiles. macOS and iOS do not support Linux perf so how can I use sampling PGO on these platforms? Is there something ready to use in Xcode Instruments for that? Maybe some converter from Xcode profiler format into Linux perf format (that then can be consumed by https://github.com/google/autofdo).
After reading the Xcode PGO documentation (https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/xcode_profile_guided_optimization/pgo-tasks/pgo-tasks.html) it's unclear what PGO way it uses. Is it FrontEnd PGO (-fprofile-instr-generate in Clang), IR PGO (-fprofile-generate), CSIR PGO (-fcs-profile-generate) or any combination of all these PGO kinds? What target platform are supported for PGO optimization? macOS, iOS, tvOS - what exactly?
Are there any differences in PGO implementation between Clang and Apple Clang?
Thanks in advance.