RFR: 8361492: [IR Framework] Has too restrictive regex for load and store

Marc Chevalier mchevalier at openjdk.org
Fri Jul 11 17:01:53 UTC 2025


On Fri, 11 Jul 2025 16:56:16 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:

> Improving store and load regexes + adding test. It's mostly an improve version of a fix I had to do in Valhalla where it was blocking (part of JDK-8361250, blocking JDK-8357785).
> 
> The new regex takes into account that classes can implement interfaces, nested classes, and various labels after the `@`. It should be more robust.
> 
> Thanks,
> Marc

test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java line 2980:

> 2978:     // @bla: bli:a/b/c$d$e (f/g,h/i/j):NotNull+24 *
> 2979:     private static final String LOAD_STORE_PREFIX = "@(\\w+: ?)*[\\w/\\$]*\\b";
> 2980:     private static final String LOAD_STORE_SUFFIX = "( \\([^\\)]+\\))?(:|\\+)\\S* \\*";

I moved these definitions next to the only place they are used, and should be used.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26269#discussion_r2201316286


More information about the hotspot-compiler-dev mailing list