RFR: 8325467: Support methods with many arguments in C2 [v27]
Daniel Lundén
dlunden at openjdk.org
Wed Sep 17 09:17:19 UTC 2025
On Tue, 16 Sep 2025 14:27:51 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> The ADLC-generated code relies on using the constructor implicitly, so I prefer not touching it in this changeset at least. All the copies are deep, clarified now.
>
> Ok, I understand. Can you show me an example, so I can understand a little better?
Here is an example (compiled from different files). The constructor gets called when converting from reference to value at the return of `divI_proj_mask`. We could fix this by making the return type of `Matcher::divI_proj_mask` `RegMask&` and updating `UDivModINode::match` accordingly, but I regard this as out of scope for this already large PR. I'd be happy to have a look at this in a follow-up PR.
const RegMask _INT_RAX_REG_mask( 0x100000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, false );
inline const RegMask &INT_RAX_REG_mask() { return _INT_RAX_REG_mask; }
// Register for DIVI projection of divmodI
RegMask Matcher::divI_proj_mask() {
return INT_RAX_REG_mask();
}
//------------------------------match------------------------------------------
// return result(s) along with their RegMask info
Node* UDivModINode::match( const ProjNode *proj, const Matcher *match ) {
uint ideal_reg = proj->ideal_reg();
RegMask rm;
if (proj->_con == div_proj_num) {
rm = match->divI_proj_mask();
} else {
assert(proj->_con == mod_proj_num, "must be div or mod projection");
rm = match->modI_proj_mask();
}
return new MachProjNode(this, proj->_con, rm, ideal_reg);
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2354848956
More information about the hotspot-compiler-dev
mailing list