RFR: 8320128: Clean up Parse constructor for OSR [v4]

Aleksey Shipilev shade at openjdk.org
Thu Jan 4 17:19:28 UTC 2024


On Thu, 4 Jan 2024 17:06:38 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()).
>
> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Use print_cr for the log message.

src/hotspot/share/opto/parse1.cpp line 414:

> 412:   if (PrintCompilation || PrintOpto) {
> 413:     // Make sure I have an inline tree, so I can print messages about it.
> 414:     InlineTree::find_subtree_from_root(C->ilt(), caller, parse_method);

Reading this again, you sure that we don't need `caller->caller()` on `is_osr_parse()` path?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16669#discussion_r1442052577


More information about the hotspot-compiler-dev mailing list