llvm-project
1bfac01b - [CGData][GMF] Don't parameterize callees in ptrauth-calls functions (#234008)

Commit
5 days ago
[CGData][GMF] Don't parameterize callees in ptrauth-calls functions (#234008) `GlobalMergeFunctions` can merge two functions that differ only in a direct callee by passing the callee as a parameter, which turns the call into an indirect call. In a function with the `"ptrauth-calls"` attribute every indirect call is expected to carry a ptrauth bundle, so the merged body ends up with an unauthenticated `blr`. Signing the parameter would cost a signed-pointer materialization in every thunk, which works against the size win the pass is after, so decline the parameterization, as is already done for calls that carry a ptrauth bundle. Functions that differ elsewhere still merge. Found by inspection and reproduced with `-enable-global-merge-func` on arm64e. Assisted-by: Claude
Author
Parents
Loading