[PATCH] D150192: Allow clang to emit inrange metadata when generating code for array subscripts
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 9 11:17:35 PDT 2023
efriedma added a comment.
>From what I recall, "inrange" is actually more restrictive than the normal C/C++ array indexing rules. Specifically, the bits regarding comparisons. "inrange" was designed to allow splitting globals indexed using inrange.
That isn't to say that functionality like this isn't useful, but we probably need to call it something different. And I'm not sure an attribute on a GEP is actually the best way to represent the semantics. It might make sense to use a separate intrinsic to represent this, especially given the direction of https://discourse.llvm.org/t/rfc-replacing-getelementptr-with-ptradd/68699 .
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150192/new/
https://reviews.llvm.org/D150192
More information about the cfe-commits
mailing list