RFR: 8310308: IR Framework: check for type and size of vector nodes [v6]
Christian Hagedorn
chagedorn at openjdk.org
Thu Jun 29 14:55:04 UTC 2023
On Thu, 29 Jun 2023 13:53:31 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/irrule/IRRule.java line 51:
>>
>>> 49: this.ruleId = ruleId;
>>> 50: this.irAnno = irAnno;
>>> 51: this.matcher = new MatchableMatcher(new CompilePhaseIRRuleBuilder(irAnno, compilation).build(vmInfo));
>>
>> For consistency, I would move `vmInfo` directly into the `CompilePhaseIRRuleBuilder` constructor.
>
> For consistency with what exactly? How would I pass it on/down from the `CompilePhaseIRRuleBuilder` constructor?
In the IR framework, I'm usually passing the required information to the constructor of the builder class and then just call `build()`. You could also do the same here since you otherwise need to pass the `vmInfo` around inside the `CompilePhaseIRRuleBuilder` class to the different private methods.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14539#discussion_r1246733841
More information about the hotspot-compiler-dev
mailing list