RFR: 8325467: Support methods with many arguments in C2 [v12]

Daniel Lundén dlunden at openjdk.org
Thu Apr 3 12:54:08 UTC 2025


On Tue, 1 Apr 2025 16:00:46 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

>> Daniel Lundén has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Formatting updates
>>  - Add register mask fuzzer test
>
> src/hotspot/share/opto/chaitin.cpp line 1533:
> 
>> 1531:     // hesitation).
>> 1532:     if (OptoReg::is_valid(reg2) &&
>> 1533:         OptoReg::is_reg(reg2 - lrg.mask().offset_bits())) {
> 
> I agree that this was probably an oversight in the original code. For simplicity I suggest to replace the check with just `OptoReg::is_reg(reg2)` as you suggest, explicitly limiting the scope of the alternation heuristic to physical registers. I compared the overall effectiveness of post-allocation copy removal (as summarized by `-XX:+PrintOptoStatistics`) between this changeset and your proposed simplification and I cannot see any significant difference. I really wonder if the entire alternation heuristic really has any positive measurable effect, but that investigation belongs to another RFE.

Thanks for comparing! Now changed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2026931949


More information about the hotspot-compiler-dev mailing list