RFR: 8292190: [IR Framework] Remove redundant regex matching for failing counts constraints
Christian Hagedorn
chagedorn at openjdk.org
Thu Aug 11 06:54:03 UTC 2022
When checking a counts constraint, we are applying regex matching on the compilation output but only keep the count of all matches:
https://github.com/openjdk/jdk/blob/37d3146cca2c40dd53fcebd9cb78595f018b3489/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/irrule/Counts.java#L92-L96
If that does not match the expected count (L87) as stated in the IR rule (i.e. an IR matching failure), we reapply regex matching (L102) to get the matched output as well (used for the reporting):
https://github.com/openjdk/jdk/blob/37d3146cca2c40dd53fcebd9cb78595f018b3489/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/irrule/Counts.java#L85-L89
https://github.com/openjdk/jdk/blob/37d3146cca2c40dd53fcebd9cb78595f018b3489/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/irrule/Counts.java#L98-L103
This is not efficient and is now merged into a single regex matching application which is especially beneficial when matching on large compilation output strings (as for example seen in Valhalla IR tests).
Thanks,
Christian
-------------
Commit messages:
- 8292190: [IR Framework] Remove redundant regex matching for failing counts constraints
Changes: https://git.openjdk.org/jdk/pull/9831/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9831&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8292190
Stats: 25 lines in 2 files changed: 3 ins; 7 del; 15 mod
Patch: https://git.openjdk.org/jdk/pull/9831.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/9831/head:pull/9831
PR: https://git.openjdk.org/jdk/pull/9831
More information about the hotspot-compiler-dev
mailing list