[PATCH] D99791: [CGCall] Annotate pointer argument with alignment

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 5 23:52:10 PDT 2021


rjmccall added a comment.

The last major conversation we had about this was this RFC I sent out about five years ago:

  https://lists.llvm.org/pipermail/llvm-dev/2016-January/094012.html

In that RFC, I specifically argued that we should not do this, and that it should only be considered undefined behavior to actually access memory through a misaligned pointer (for a particular definition of "access memory").  At Apple, we have made that a promise to our internal users, so even if we decide to do this, we will need to not do it on Darwin.  However, as I remember it, the LLVM community did not reach a consensus to adopt my recommendation, so in principle we still have the flexibility to start doing this.  I continue to believe that doing so would be a mistake.  At any rate, you should start by reading that thread.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99791



More information about the cfe-commits mailing list