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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 2 15:02:48 PDT 2021


efriedma added a comment.

This feels scary: the C standard technically allows this, but we haven't done it in the past, and it could break otherwise functioning code.  (We've only assumed alignment about pointers that are dereferenced/dereferenceable.)

For D99790 <https://reviews.llvm.org/D99790>, we're already marking the pointer dereferenceable, so also marking the alignment seems like a small extra step.  (Really, it's a regression fix; we used to treat dereferenceable as implying alignment. I guess I missed a spot when I was fixing that.)  But here, we're not assuming it's dereferenceable at the moment.  So there's more potential to break code, and also the potential benefit is small.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99791



More information about the llvm-commits mailing list