[PATCH] D103288: [SanCov] Properly set ABI parameter attributes

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 3 16:40:53 PDT 2021


rnk added a comment.

I don't like the idea of having the IRBuilder look at the call target and implicitly setting attributes, but I am open to revisiting the backend change. Here's a rationale for going back to the old behavior:

- calling a function with the wrong function prototype is UB
- calling a function with mismatched ABI attributes is very much like prototype mismatch, so it's UB
- LLVM can generate whatever code it wants in cases of UB. So, if we have a direct callee, why not have the backend implicitly use the attributes from the callee?

I've forgotten why exactly we wanted to avoid looking at the callee's attributes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103288/new/

https://reviews.llvm.org/D103288



More information about the llvm-commits mailing list