RFR: JDK-8241503: C2: Share MacroAssembler between mach nodes during code emission [v6]
Vladimir Kozlov
kvn at openjdk.org
Tue Dec 19 19:03:51 UTC 2023
On Mon, 18 Dec 2023 20:19:49 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
>> Cesar Soares Lucas has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:
>>
>> - Merge with origin/master
>> - Fix build, copyright dates, m4 files.
>> - Fix merge
>> - Catch up with master branch.
>>
>> Merge remote-tracking branch 'origin/master' into reuse-macroasm
>> - Some inst_mark fixes; Catch up with master.
>> - Catch up with changes on master
>> - Reuse same C2_MacroAssembler object to emit instructions.
>
> Cleanup is not bad. Fewer objects and a bit shorter code at some places are an advantage.
> Maybe Vladimir had some more reasons in mind when filing the issue. It's linked to https://bugs.openjdk.org/browse/JDK-8239472. It'd be nice if you or Vladimir could add a bit of motivation to the description of the PR or the JBS issue.
@TheRealMDoerr motivation is to reduce memory consumption and speed up C2. `C2_MacroAssembler` is based on `ResourceObj` which allocates in compiler arena. Each small `C2_MacroAssembler masm()` will add allocation to arena until we finish compilation. Also speedup because we don't need to do such allocations.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16484#issuecomment-1863321348
More information about the shenandoah-dev
mailing list