RFR: 8323220: Reassociate loop invariants involved in Cmps and Add/Subs [v14]
Christian Hagedorn
chagedorn at openjdk.org
Fri Apr 5 13:38:14 UTC 2024
On Fri, 5 Apr 2024 13:23:32 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/loopopts/InvariantCodeMotionReassociateAddSub.java line 36:
>>
>>> 34: * @summary Test loop invariant code motion of add/sub through reassociation
>>> 35: * @library /test/lib /
>>> 36: * @run main compiler.c2.loopopts.InvariantCodeMotionReassociateAddSub
>>
>> You should use `driver` since we do not want to stress the driver VM with additionally passed VM flags like `-Xcomp` when running IR tests.
>> Suggestion:
>>
>> * @run driver compiler.c2.loopopts.InvariantCodeMotionReassociateAddSub
>
> But if we put `driver` here, do the flags get passed to the IR framework test VM?
Yes, they are passed by the IR framework. I think for IR tests, we should not stress the driver VM. The sole purpose of the driver VM is to start the actual test VM (by passing the `javaoptions` and `vmoptions`) and do IR matching afterward. I don't think there is much benefit if we try to also stress the driver VM each time in a normal IR test.
What we could do (and I'm not sure if we already do that) is to have a dedicated (or a set of) IR test that runs with `main` such that the driver VM is also stressed at some point. But that should be done separately.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17375#discussion_r1553650749
More information about the hotspot-compiler-dev
mailing list