[lworld] RFR: 8361250: [lworld] use more IRNode regexes in valhalla IR tests
Marc Chevalier
mchevalier at openjdk.org
Fri Jul 4 18:25:35 UTC 2025
InlineTypeIRNode is Valhalla-specific and somewhat... antique. I've run into an issue where the old-timey regex for allocation didn't do the job. So, rather than reproducing the fix of [JDK-8314999](https://bugs.openjdk.org/browse/JDK-8314999) again, let's simply use `IRNode`'s regex for Valhalla as well.
The general idea: let's not define node regex specifically for Valhalla, but only for values. I've also introduced regexes for combinations we do all the time: for instance rather than having `ALLOC_OF, ANY_KLASS`, I made a `ALLOC_OF_ANY_KLASS`.
So what now:
- `InlineTypeRegexes` => only value regexes.
- `IRNode` => adapted to allow to define specialisation for `ALLOC_OF`, `ALLOC_ARRAY_OF`, `LOAD_OF_CLASS`, `STORE_OF_CLASS`, `STATIC_CALL_OF_METHOD` for specific classes/functions.
- `InlineTypeIRNode` => define specialisations using the regexes defined in `InlineTypeRegexes`, nothing more!
- `compiler/valhalla/inlinetypes/Test*` => use `IRNode` and `InlineTypeIRNode`.
-------------
Commit messages:
- Fix visibility
- Forgot a space
- Refactor inlinetypes/InlineTypeIRNode
Changes: https://git.openjdk.org/valhalla/pull/1503/files
Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1503&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8361250
Stats: 754 lines in 14 files changed: 152 ins; 148 del; 454 mod
Patch: https://git.openjdk.org/valhalla/pull/1503.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1503/head:pull/1503
PR: https://git.openjdk.org/valhalla/pull/1503
More information about the valhalla-dev
mailing list