nikic wrote:

@aeubanks @preames @nhaehnle Before I finish up this PR (need to update more 
tests and fix GlobalSplit), I'd like to have some feedback on one point.

I'm currently proposing the `inrange` attribute to be relative to the result 
pointer, so
```
getelementptr inbounds inrange(-16, 16) (i8, ptr @vt, i64 48)
```
would mean that `[-16, 16)` of the *result* is inrange, which would correspond 
to `[32, 64)` of the source.

An alternative would be to make inrange relative to the source pointer instead, 
in which case it would be:
```
getelementptr inbounds inrange(32, 64) (i8, ptr @vt, i64 48)
```

Does anyone have thoughts on which would be better?

I feel like I must have had a reason to pick this when writing the RFC, but I 
don't remember what it was... I'm starting to lean towards using the second 
form, because it will always give the same range regardless of which specific 
vtable pointer you point to.

https://github.com/llvm/llvm-project/pull/84341
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to