RFR: 8264063: Outer Safepoint poll load should not reference the head of inner strip mined loop.

Vladimir Kozlov kvn at openjdk.java.net
Wed Apr 7 16:05:02 UTC 2021


On Wed, 7 Apr 2021 04:53:44 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Should we also remove below part of code in `loopTransform.cpp` in this patch?
>> 
>> 3704         if (n->is_CountedLoop() && n->as_CountedLoop()->is_strip_mined()) {
>> 3705           // In strip-mined counted loops, the CountedLoopNode may be
>> 3706           // used by the address polling node of the outer safepoint.
>> 3707           // Skip this use because it's safe.
>> 3708           Node* sfpt = n->as_CountedLoop()->outer_safepoint();
>> 3709           Node* polladr = sfpt->in(TypeFunc::Parms+0);
>> 3710           if (use == polladr) {
>> 3711             continue;
>> 3712           }
>> 3713         }
>
>> Should we also remove below part of code in `loopTransform.cpp` in this patch?
>> 
>> ```
>> 3704         if (n->is_CountedLoop() && n->as_CountedLoop()->is_strip_mined()) {
>> 3705           // In strip-mined counted loops, the CountedLoopNode may be
>> 3706           // used by the address polling node of the outer safepoint.
>> 3707           // Skip this use because it's safe.
>> 3708           Node* sfpt = n->as_CountedLoop()->outer_safepoint();
>> 3709           Node* polladr = sfpt->in(TypeFunc::Parms+0);
>> 3710           if (use == polladr) {
>> 3711             continue;
>> 3712           }
>> 3713         }
>> ```
> 
> I thought that it does not harm to have this code but on other hand it will be not executed anymore.
> I will removed it and I will run ArrayFill.java to make sure optimization works with strip mined loops.

I removed pointed code and verified that arrayfill optimization still works with strip mined loops.

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

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


More information about the hotspot-compiler-dev mailing list