RFR: 8323220: Reassociate loop invariants involved in Cmps and Add/Subs
Emanuel Peter
epeter at openjdk.org
Tue Jan 16 17:54:19 UTC 2024
On Tue, 16 Jan 2024 17:44:45 GMT, Joshua Cao <duke at openjdk.org> wrote:
>> You could always use a simple regex with the linenumber I guess. But that is a bit nasty too.
>
> Yeah, it would work for this patch. But people working on future unrelated changes may have to change the line number. Seems more pain than its worth.
Another suboptimal idea: you wrap the add / sub in a method, and then ensure that this method is inlined. It might still keep the annotation of being part of that inner method, and you could use regex to check for it.
Or maybe we could also have some sort of relative line offset mechanism in the IR framework, that allows you to specify that you want something that is let's say 7 lines down from the IR rule.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17375#discussion_r1453773799
More information about the hotspot-compiler-dev
mailing list