Many of the new Valhalla compiler tests use the [IR Framework](https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/lib/ir_framework/README.md) and should be run in `@run driver` mode because the framework will spawn a new test VM and we want to avoid that the framework itself is affected by VM flags. Unfortunately, this does not work with tests requiring `--enable-preview` and we therefore need to run these tests in `@run main` mode in Valhalla. `-Xcomp` and other expensive flags slow down execution significantly, wasting machine hours and causing timeouts.
Jtreg 8.3 now finally supports driver mode with `--enable-preview` ([CODETOOLS-7904153](https://bugs.openjdk.org/browse/CODETOOLS-7904153)), so we can adjust the tests accordingly. With these changes, runtime of `TestLWorld#id0` with `-Xcomp`, for example, improves by about **22.5%**. I'll hold off with integration until the new jtreg version becomes the default with [JDK-8386844](https://bugs.openjdk.org/browse/JDK-8386844). Thanks, Tobias --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - JDK-8387256 Changes: https://git.openjdk.org/valhalla/pull/2585/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2585&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8381693 Stats: 192 lines in 25 files changed: 4 ins; 44 del; 144 mod Patch: https://git.openjdk.org/valhalla/pull/2585.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2585/head:pull/2585 PR: https://git.openjdk.org/valhalla/pull/2585
