Nikita Popov
ddb46abd3c
[LSR] Don't consider users of constant outside loop
...
In CollectLoopInvariantFixupsAndFormulae(), LSR looks at users
outside the loop. E.g. if we have an addrec based on %base, and
%base is also used outside the loop, then we have to keep it in a
register anyway, which may make it more profitable to use
%base + %idx style addressing.
This reasoning doesn't hold up when the base is a constant, because
the constant can be rematerialized. The lsr-memcpy.ll test regressed
when enabling opaque pointers, because inttoptr (i64 6442450944 to ptr)
now also has a use outside the loop (previously it didn't due to a
pointer type difference), and that extra "use" results in worse use
of addressing modes in the loop. However, the use outside the loop
actually gets rematerialized, so the alleged register saving does
not occur.
The same reasoning also applies to other types of constants, such
as global variable references.
Differential Revision: https://reviews.llvm.org/D155073
2023-07-13 12:22:38 +02:00
..
2023-07-13 12:22:38 +02:00
2023-06-21 21:20:26 -04:00
2023-07-12 11:48:44 +02:00
2023-05-17 17:03:15 +02:00
2023-05-17 17:03:15 +02:00
2023-05-17 17:03:15 +02:00
2023-07-12 11:48:44 +02:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-04-06 17:31:27 +07:00
2023-07-12 11:32:13 +02:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-06-23 17:13:57 +02:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-07-12 09:46:08 +02:00
2023-07-12 09:46:08 +02:00
2023-01-05 12:43:45 +01:00
2023-04-06 17:31:27 +07:00
2023-01-05 12:43:45 +01:00
2023-01-06 10:51:02 +00:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-04-06 17:31:27 +07:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-06-23 17:13:57 +02:00
2023-01-05 12:43:45 +01:00
2023-03-07 17:10:34 +01:00
2023-03-20 11:22:21 -07:00
2023-03-21 09:30:01 -07:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-06-23 17:13:57 +02:00
2023-07-12 14:35:55 +02:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-04-11 16:49:12 +02:00
2023-01-05 12:43:45 +01:00
2023-04-11 16:49:12 +02:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-06-22 15:36:32 +01:00
2023-01-05 12:43:45 +01:00
2023-04-11 16:49:12 +02:00
2023-04-06 17:31:27 +07:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-02-21 00:13:04 +05:30
2023-01-05 12:43:45 +01:00
2023-06-22 19:10:48 +01:00
2023-03-10 17:17:00 -08:00
2023-01-05 12:43:45 +01:00
2023-01-06 12:14:45 +01:00
2023-01-05 12:43:45 +01:00
2023-06-23 17:13:57 +02:00
2023-01-05 12:43:45 +01:00
2023-06-23 17:13:57 +02:00
2023-04-11 16:49:12 +02:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00
2023-01-05 12:43:45 +01:00