I’ve a number of questions relating to Profile-Guided Optimization (PGO) on Apple platforms (macOS and iOS).

Is there a approach 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 don’t assist Linux perf so how can I exploit sampling PGO on these platforms? Is there one thing prepared to make use of in Xcode Devices for that? Perhaps some converter from Xcode profiler format into Linux perf format (that then could be consumed by https://github.com/google/autofdo).

After studying the Xcode PGO documentation (https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/xcode_profile_guided_optimization/pgo-tasks/pgo-tasks.html) it is unclear what PGO manner it makes use of. Is it FrontEnd PGO (-fprofile-instr-generate in Clang), IR PGO (-fprofile-generate), CSIR PGO (-fcs-profile-generate) or any mixture of all these PGO varieties? What goal platform are supported for PGO optimization? macOS, iOS, tvOS – what precisely?

Are there any variations in PGO implementation between Clang and Apple Clang?

Thanks prematurely.

zamazan4ik is a brand new contributor to this web site. Take care in asking for clarification, commenting, and answering.
Try our Code of Conduct.

1