Yeah, migration to new intrinsics is definitely an option. I see basically two paths:
- Migrate to new intrinsics
- Multi-step approach:
- Overload the existing intrinsics, without
argmem
andnocapture
and implementaddrspace(7)
lowering. - Migrate frontends to native
load/store/etc.
where possible. - Remove the overloading from the existing intrinsics, tighten to
argmem
andnocapture
generally.
- Overload the existing intrinsics, without
The questions are:
- Which approach is easier?
- Are there significant differences in terms of strength of alias analysis?
For the second question, where will these intrinsics be present in the IR? If they’re only present for a short time (between lowering of addrspace(7)
pointers and instruction selection), then perhaps the weaker attributes just don’t matter too much.
I suppose there are also structured buffer intrinsics which are present for longer because we can’t represent them with native load/store
. At least the proposal doesn’t regress them; and frontends could insert stronger attributes at call sites for those.
So I think either path is okay. We don’t have that many buffer intrinsics, so perhaps just duplicating them is for the best, but I don’t feel too strongly about it. For image intrinsics, the story would be a bit different IMO, because there are just so damn many of them.