[lld] [CGData] LLD for MachO (PR #90166)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 06:37:55 PDT 2024


ellishg wrote:

`-fprofile-generate` supports modifiers like `%p, %h, %m, %t, and %c` to allow generating raw profile filenames based on the run instance. This is especially useful when we want to dump a bunch of raw profiles to a directory.

https://clang.llvm.org/docs/UsersManual.html#profiling-with-instrumentation

Do you think we should support something similar given that we can pass a directory to the clang frontend flag in https://github.com/llvm/llvm-project/pull/90304? If we build several binaries, we still want to disambiguate the `.cgdata` files, even if we want to dump them in the same directory. Maybe `%n` could expand to the binary name and `%b` could expand to some build number, which could be anywhere in the path. I'm also not sure if it's better to implement this in Clang or LLVM. 

https://github.com/llvm/llvm-project/pull/90166


More information about the llvm-commits mailing list