Nikita Popov
0f46e31cfb
[IR] Change representation of getelementptr inrange ( #84341 )
...
As part of the migration to ptradd
(https://discourse.llvm.org/t/rfc-replacing-getelementptr-with-ptradd/68699 ),
we need to change the representation of the `inrange` attribute, which
is used for vtable splitting.
Currently, inrange is specified as follows:
```
getelementptr inbounds ({ [4 x ptr], [4 x ptr] }, ptr @vt, i64 0, inrange i32 1, i64 2)
```
The `inrange` is placed on a GEP index, and all accesses must be "in
range" of that index. The new representation is as follows:
```
getelementptr inbounds inrange(-16, 16) ({ [4 x ptr], [4 x ptr] }, ptr @vt, i64 0, i32 1, i64 2)
```
This specifies which offsets are "in range" of the GEP result. The new
representation will continue working when canonicalizing to ptradd
representation:
```
getelementptr inbounds inrange(-16, 16) (i8, ptr @vt, i64 48)
```
The inrange offsets are relative to the return value of the GEP. An
alternative design could make them relative to the source pointer
instead. The result-relative format was chosen on the off-chance that we
want to extend support to non-constant GEPs in the future, in which case
this variant is more expressive.
This implementation "upgrades" the old inrange representation in bitcode
by simply dropping it. This is a very niche feature, and I don't think
trying to upgrade it is worthwhile. Let me know if you disagree.
2024-03-20 10:59:45 +01:00
..
2024-02-01 13:37:37 +00:00
2023-06-29 09:49:16 +02:00
2023-05-17 17:03:15 +02:00
2023-10-29 08:41:11 +00:00
2023-05-17 17:03:15 +02:00
2023-05-17 17:03:15 +02:00
2024-03-05 14:21:33 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2023-09-28 17:27:41 -05:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2023-01-05 12:43:45 +01:00
2023-11-26 21:24:29 +00:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2023-10-28 23:21:11 -07:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2023-04-06 16:54:00 +02:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2023-03-15 10:30:28 -07:00
2022-12-08 10:05:23 +01:00
2023-10-03 16:12:06 -05:00
2023-05-24 15:40:56 +01:00
2024-02-05 11:57:34 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:17:02 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2023-08-17 09:56:25 +05:30
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2023-11-26 21:24:29 +00:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2023-12-31 20:44:48 +08:00
2024-03-20 10:59:45 +01:00
2023-12-31 20:44:48 +08:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2023-08-09 18:33:11 -04:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2023-01-05 12:43:45 +01:00
2022-12-08 10:05:23 +01:00
2023-11-26 21:24:29 +00:00
2023-05-25 18:43:16 +03:00
2023-08-09 18:33:11 -04:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2023-06-16 13:53:31 -07:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2024-02-29 10:42:06 +08:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2023-01-03 12:44:20 +01:00
2022-12-08 03:09:27 +03:00
2024-02-05 11:57:34 +01:00
2022-12-08 03:09:27 +03:00
2022-10-10 13:42:42 -07:00
2023-01-03 12:44:20 +01:00
2022-12-08 10:05:23 +01:00
2023-10-02 21:27:07 -07:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2023-05-25 09:55:53 -07:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2023-01-06 13:53:10 -05:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2024-02-23 09:30:36 +01:00
2023-11-26 21:24:29 +00:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2024-02-11 18:24:59 +08:00
2024-02-11 18:24:59 +08:00
2023-08-09 18:33:11 -04:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2024-02-05 11:57:34 +01:00
2024-02-05 11:57:34 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-15 13:54:25 -08:00
2023-06-21 14:00:53 -07:00
2022-12-08 11:47:16 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2023-12-31 20:44:48 +08:00
2023-06-21 11:32:45 +02:00
2023-06-21 11:32:45 +02:00
2023-11-26 21:24:29 +00:00
2022-12-30 07:31:47 -08:00
2022-12-30 07:31:47 -08:00
2022-12-02 14:25:13 -08:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2023-05-19 12:25:44 -07:00
2022-12-08 10:05:23 +01:00
2023-11-26 21:24:29 +00:00
2023-01-06 13:53:10 -05:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2023-08-16 22:43:04 -05:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 12:47:24 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2023-01-03 12:44:20 +01:00
2022-12-08 10:05:23 +01:00
2022-09-19 09:57:37 -07:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2023-02-16 09:39:44 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2023-11-10 10:50:35 -05:00
2022-12-08 11:47:16 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2022-12-08 10:05:23 +01:00
2023-10-03 16:12:19 -05:00
2023-10-03 16:12:16 -05:00
2023-08-16 09:27:01 +02:00
2023-07-21 16:04:13 -04:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 10:05:23 +01:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00
2022-12-08 03:09:27 +03:00