[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers
Nuno Lopes via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 3 09:18:38 PST 2020
nlopes added a comment.
@lebedev.ri I agree with you that the semantics of these alignment builtins should only return a pointer that is of the same object as the one given as input.
Otherwise, these builtins would be even worst that ptr2int/int2ptr, since their result could alias with any other pointer in the program, not just the escaped pointers.
I gave a glance through the patch, especially the documentation section, and the semantics look right to me.
Would be nice to see this using ptrmask on a subsequent patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71499/new/
https://reviews.llvm.org/D71499
More information about the cfe-commits
mailing list