RFR: 8267982: Set the node after peephole optimization to be removed [v2]

Vladimir Kozlov kvn at openjdk.java.net
Wed Jun 23 06:28:29 UTC 2021


On Wed, 23 Jun 2021 04:46:56 GMT, SUN Guoyun <github.com+40024232+sunny868 at openjdk.org> wrote:

>> Hi all,
>> 
>> Enable peephole can cause SIGSEGV sometimes in OopFlow::build_oop_map(Node*, int, PhaseRegAlloc*, int*)+0x238 , so must set a removed-flags for the peephole-nodes , to avoid be set-live-bit() and cause crash.
>>  Please review this trivial change.
>> 
>> Thanks,
>> Sun Guoyun
>
> SUN Guoyun has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
> 
>   8267982: Set the node after peephole optimization to be removed

src/hotspot/share/adlc/output_c.cpp line 1346:

> 1344: 
> 1345:   for( int i = 0; i <= max_position; i++)
> 1346:     fprintf(fp, "        inst%d->set_removed();\n", i);

Code style. Use `{}`:

for () {
}

src/hotspot/share/opto/buildOopMap.cpp line 470:

> 468:           int second = regalloc->get_reg_second(def);
> 469:           if( OptoReg::is_valid(first) && !def->get_removed()) set_live_bit(tmp_live,first);
> 470:           if( OptoReg::is_valid(second) && !def->get_removed()) set_live_bit(tmp_live,second);

You need `def->as_Mach()->get_removed()` because `def ` is `Node*`.

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

PR: https://git.openjdk.java.net/jdk/pull/4276


More information about the hotspot-compiler-dev mailing list