Does the Swift compiler support IR-level LLVM instrumentation (PGO)?


I haven't seen this anywhere. The -profile-generate options generates a FE profile based on SIL afaik, and there's no option (either in Swift, or that can be passed to LLVM directly) to get IR-level profiling.

Is it possible at all? I'd need this because I'd like to map profiling data to the embedded bitcode of a compiled Swift executable for a pet project, but it's hard to do with FE info. The function names are all slightly different so they don't cleanly map to the IR names.

To be clear, I'm talking about the generated .profdata file from Xcode. It's always Front-End according to llvm-profdata show, and I can't make it IR.