teresajohnson wrote: Also, if you are going to use an internal attribute, how about using the existing -mllvm -force-attribute=use-sample-profile. The ForceFunctionAttrs pass runs early in the ThinLTO pre-link pipeline, before sample pgo. https://github.com/llvm/llvm-project/pull/66178