[PATCH] D150192: Allow clang to emit inrange metadata when generating code for array subscripts
Shiva Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 10 03:46:13 PDT 2023
shiva0217 added a comment.
In D150192#4330199 <https://reviews.llvm.org/D150192#4330199>, @efriedma wrote:
> 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 .
Hi Eli,
Very appreciate your inputs. ^^
Is there any idea how the intrinsic should look like and how it associated with GEP before ptradd arrive?
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