RFR: 8317507: C2 compilation fails with "Exceeded _node_regs array" [v2]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Thu Oct 26 10:22:35 UTC 2023
On Wed, 25 Oct 2023 23:00:44 GMT, Dean Long <dlong at openjdk.org> wrote:
>> src/hotspot/share/adlc/output_c.cpp line 3132:
>>
>>> 3130: fprintf(fp_cpp, " // Do not increment node index counter, since node reuses my index\n");
>>> 3131: fprintf(fp_cpp, " Compile* C = Compile::current();\n");
>>> 3132: fprintf(fp_cpp, " C->set_unique(C->unique() - 1);\n");
>>
>> This code seems to be static with no specializations. It would be nice if it could be in a regular .cpp file. The only complication seems to be including it only if `used` is set, which could translate into an #ifdef.
>
> Or maybe something as simple as:
>
> if (used) {
> fprintf(fp_cpp, "#include "machnode.cpp.inc"");
> }
Thanks for the suggestion, Dean. I am also a bit doubtful about having all this static code in `output_c.cpp`, my suggestion would be simply moving the entire definition of `fill_new_machnode()` to `machnode.cpp` (as in https://github.com/openjdk/jdk/commit/7f5c739919b166354d96e190702a515bbd3b3f5a). But I think it is better to address this (pre-existing) issue in a separate RFE and keep this bug fix small. What do you think?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16306#discussion_r1372932214
More information about the hotspot-compiler-dev
mailing list