RFR: 8320128: Clean up Parse constructor for OSR
Tobias Hartmann
thartmann at openjdk.org
Mon Nov 20 06:41:32 UTC 2023
On Wed, 15 Nov 2023 07:01:35 GMT, Xin Liu <xliu at openjdk.org> wrote:
> There's a special case for the constructor of Parse. If current compilation is OSR and it is handling the top-level method(depth() == 1), then
>
> 1. _tf = C->tf();
> 2. _entry_bci = C->entry_bci();
> 3. _flow = method()->get_osr_flow_analysis(_entry_bci);
>
> We don't need to assign those member data twice. We can also factor out _flow->failing() for the special case and normal cases.
>
> It's worth mentioning that we can't save ciTypeFlow computation because
> get_osr_flow_analysis(_entry_bci) actually needs get_flow_analysis(method()).
src/hotspot/share/opto/parse1.cpp line 502:
> 500: } else {
> 501: _tf = TypeFunc::make(method());
> 502: _entry_bci = InvocationEntryBci;
This is already set in line 404, right? Should it be removed there?
src/hotspot/share/opto/parse1.cpp line 507:
> 505:
> 506: if (_flow->failing()) {
> 507: assert(false, "type flow failed during parsing");
Suggestion:
assert(false, "type flow analysis failed during parsing");
src/hotspot/share/opto/parse1.cpp line 511:
> 509: #ifndef PRODUCT
> 510: if (PrintOpto && (Verbose || WizardMode)) {
> 511: if (_entry_bci != InvocationEntryBci) {
Suggestion:
if (C->is_osr_compilation()) {
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16669#discussion_r1398714843
PR Review Comment: https://git.openjdk.org/jdk/pull/16669#discussion_r1398715587
PR Review Comment: https://git.openjdk.org/jdk/pull/16669#discussion_r1398715349
More information about the hotspot-compiler-dev
mailing list