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-03-14 14:31:00 +00:00
2024-02-26 13:02:08 +00:00
2023-12-15 12:33:32 +01:00
2024-03-14 14:31:00 +00:00
2023-07-05 10:13:33 +01:00
2024-03-15 09:46:58 -07:00
2024-03-06 09:49:58 -06:00
2024-03-11 13:58:45 -04:00
2023-07-28 12:13:35 -07:00
2022-12-15 21:04:38 -08:00
2023-04-04 20:06:34 +01:00
2023-02-28 13:05:38 -07:00
2023-09-25 09:32:59 -07:00
2023-12-12 14:26:04 +00:00
2024-03-14 10:56:43 +09:00
2023-11-06 16:29:52 +00:00
2023-09-13 09:57:10 +05:30
2023-01-12 15:02:16 -05:00
2024-01-21 11:54:47 -05:00
2024-03-01 14:25:46 +05:30
2024-03-18 10:34:11 +05:30
2023-11-06 12:30:07 +01:00
2024-03-19 21:44:08 -07:00
2024-02-22 09:47:36 +01:00
2023-12-13 14:18:10 +01:00
2023-06-13 10:47:18 +01:00
2023-11-30 13:18:51 -06:00
2022-12-09 13:43:38 -05:00
2022-08-20 08:30:42 +02:00
2024-03-01 21:41:12 +05:30
2024-01-24 13:43:07 +01:00
2024-02-29 13:57:59 +01:00
2024-02-23 21:14:38 -05:00
2024-02-23 21:14:38 -05:00
2024-03-12 10:30:39 -07:00
2024-02-05 08:19:53 +01:00
2024-02-27 18:04:59 -08:00
2024-02-27 18:04:59 -08:00
2024-01-24 00:27:37 -08:00
2023-07-04 11:02:12 +01:00
2023-11-24 10:23:06 +00:00
2024-03-15 09:58:25 +01:00
2023-07-27 14:49:17 +05:30
2023-07-27 14:49:17 +05:30
2023-12-13 14:18:10 +01:00
2024-03-13 12:08:39 +00:00
2024-03-05 12:59:58 -06:00
2024-02-15 12:11:51 -05:00
2024-03-17 18:15:56 +00:00
2024-02-15 12:11:51 -05:00
2024-03-15 16:08:39 +05:30
2024-01-19 10:16:46 +00:00
2024-01-19 15:30:07 +00:00
2024-03-17 18:15:56 +00:00
2024-03-06 08:11:54 -06:00
2024-03-19 16:36:29 +00:00
2023-12-11 21:01:36 -08:00
2023-09-01 08:22:16 -04:00
2024-03-20 10:59:45 +01:00
2024-02-12 22:33:29 -08:00
2024-01-21 11:54:47 -05:00
2024-03-11 09:20:01 +01:00
2024-03-01 19:15:42 +05:30
2024-01-04 19:05:12 +05:30
2024-01-04 19:05:12 +05:30
2022-12-17 00:42:05 +00:00
2023-11-20 12:13:09 +00:00
2024-01-18 09:36:44 +01:00
2023-07-05 10:26:21 +01:00
2022-06-01 21:14:48 -04:00
2022-11-30 11:32:34 +01:00
2022-07-24 21:50:35 -07:00
2023-11-07 17:26:26 +01:00
2022-07-19 15:16:28 +05:30
2022-07-19 15:16:28 +05:30
2024-02-22 09:47:36 +01:00
2024-02-21 11:45:36 +00:00
2024-02-15 10:09:20 +00:00
2024-03-19 16:36:29 +00:00
2024-03-19 11:49:22 +01:00
2023-07-18 12:07:09 +02:00
2023-09-14 14:10:14 -07:00
2023-06-28 07:25:48 -04:00
2023-01-30 16:18:20 -04:00
2024-03-17 18:15:56 +00:00
2024-01-09 11:53:12 +00:00
2023-12-28 11:48:25 +00:00
2024-02-12 10:18:20 +01:00
2024-01-25 21:32:37 -08:00
2024-01-25 21:32:37 -08:00
2023-11-11 12:32:15 -08:00
2024-01-02 13:42:56 +05:30
2024-01-24 13:43:07 +01:00
2022-09-30 14:27:50 +01:00
2024-03-12 10:30:39 -07:00
2024-03-12 10:30:39 -07:00
2024-03-18 11:18:57 +01:00
2024-03-06 12:19:32 +05:30
2023-12-11 21:01:36 -08:00
2024-02-12 07:09:49 -05:00
2023-12-19 08:32:16 +01:00
2024-01-02 13:42:56 +05:30
2023-06-13 10:47:18 +01:00
2022-08-28 10:41:50 -07:00
2024-03-13 12:03:41 +00:00
2024-03-06 09:49:58 -06:00
2024-03-05 13:49:34 -08:00
2024-03-13 09:49:30 -07:00
2023-01-22 12:48:51 -08:00
2024-03-07 11:04:43 +00:00
2024-03-18 14:29:53 +00:00
2023-12-12 11:38:24 +01:00
2024-01-25 09:35:10 +01:00
2024-03-07 14:39:59 +05:30
2022-10-01 16:21:24 +09:00
2024-03-10 20:00:13 -07:00
2024-02-26 12:19:52 -08:00
2022-08-13 12:55:42 -07:00
2024-01-17 15:22:48 +00:00
2023-06-29 16:50:46 -05:00
2024-02-14 15:19:04 +01:00
2024-02-26 12:19:52 -08:00
2024-02-26 12:19:52 -08:00
2023-11-16 16:56:46 +01:00
2024-02-27 18:04:59 -08:00
2024-01-26 12:04:58 +01:00
2024-03-08 10:53:28 -08:00
2023-12-12 11:38:24 +01:00
2022-07-05 09:18:19 -04:00
2024-03-04 12:06:49 -08:00
2023-09-14 14:10:14 -07:00
2024-02-20 11:37:44 +00:00
2022-08-08 11:24:15 -07:00
2022-08-08 11:24:15 -07:00
2023-03-14 18:06:55 -07:00
2022-06-01 09:45:40 -04:00
2023-11-14 18:49:21 +01:00
2023-09-14 14:10:14 -07:00
2024-01-14 00:53:29 -08:00
2023-01-27 22:17:16 -04:00
2022-04-19 22:36:58 -07:00
2022-12-21 10:49:32 -05:00
2022-12-21 10:49:32 -05:00
2023-01-08 17:37:02 +01:00
2023-12-11 21:01:36 -08:00
2024-01-30 22:12:07 -08:00
2022-11-18 15:57:34 +01:00
2022-11-18 15:57:34 +01:00
2023-01-23 21:43:06 +01:00
2024-02-01 09:50:44 -08:00
2024-02-01 09:50:44 -08:00
2023-11-22 08:52:53 +00:00
2023-02-22 10:15:05 +00:00
2024-01-27 22:20:22 -08:00
2024-03-15 09:46:58 -07:00
2024-03-10 20:00:13 -07:00
2023-07-06 10:26:21 -04:00
2024-03-07 10:31:34 +05:30
2023-06-05 10:32:33 +01:00
2024-02-23 17:34:55 +00:00
2024-02-09 09:57:38 +01:00
2024-03-06 17:40:13 +00:00
2024-03-15 10:22:58 +05:30
2024-02-16 13:32:59 -05:00
2024-03-17 18:15:56 +00:00
2024-03-19 09:58:09 -07:00
2024-03-15 21:09:18 +05:30
2024-03-15 21:09:18 +05:30
2024-03-13 12:08:39 +00:00
2024-03-13 12:08:39 +00:00
2023-11-06 12:30:07 +01:00
2024-03-17 18:15:56 +00:00
2023-09-14 14:10:14 -07:00
2024-02-05 14:07:01 +01:00
2024-02-05 14:07:01 +01:00
2024-01-24 07:08:43 +05:30
2023-07-31 20:15:45 -04:00
2024-03-12 10:30:39 -07:00
2024-03-12 10:30:39 -07:00
2024-03-10 20:00:13 -07:00
2024-03-06 16:33:52 +01:00
2024-02-23 17:34:55 +00:00
2023-12-13 13:52:40 +01:00
2023-12-13 13:52:40 +01:00
2024-03-08 19:05:00 +05:30
2023-06-16 05:39:50 +03:00
2023-08-07 11:35:39 +05:30
2024-03-06 10:38:20 +01:00
2023-06-16 05:39:50 +03:00
2024-03-11 15:35:05 +00:00
2024-01-28 10:47:07 -08:00
2023-12-13 13:52:40 +01:00
2023-12-13 13:52:40 +01:00
2024-03-18 14:38:27 +00:00
2023-11-24 14:43:18 +01:00
2024-02-19 13:45:23 -08:00
2024-03-06 09:36:01 +05:30
2024-02-12 16:43:48 -05:00
2024-01-03 16:32:00 +01:00
2024-03-01 17:18:55 +00:00
2024-03-15 15:40:23 +00:00
2022-05-25 14:44:09 -04:00
2024-03-08 10:53:28 -08:00
2024-03-08 10:30:01 -08:00
2024-03-11 13:58:45 -04:00
2024-03-08 09:39:10 +01:00
2024-03-08 14:49:52 -05:00
2024-03-11 13:58:45 -04:00
2023-12-12 11:38:24 +01:00
2024-03-08 10:30:01 -08:00