[PATCH] D117921: Attributes: add a new allocalign() attribute

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 25 12:46:11 PST 2022


jyknight added a comment.

> That is, the allocalign attribute indicates that the value provided to this parameter will the alignment of the return value. The semantics would be the same as with the return attribute, you just don't need to deal with integer attributes.

Using a parameter attribute instead of a function attribute with a parameter number seems quite reasonable. Let's go with that.

> If we do want to use the function attribute, I think it should be possible to support proper zero values for integer attributes.

I don't think this would be straightforward. The attribute system has the assumption that "unset == 0" in many parts of its API.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117921



More information about the llvm-commits mailing list