RFR(S): 8238723: yank_alloc_node must remove membar

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Wed Feb 19 14:11:42 UTC 2020



On 18.02.2020 20:10, Nils Eliasson wrote:
> Hi,
> 
> Thanks for the feedback.
> 
> Yes, the membar should be removed too, and membar::remove gets the job 
> done, as Tobias suggested.
> 
> I changed the removal to only look for MembarStoreStore since the 
> InitializeNode is already removed, and I can't come up with a scenario 
> where I would find an AddNode there.
> 
> http://cr.openjdk.java.net/~neliasso/8238723/webrev.02/

In addition to my previous comment.

Why do you think MembarStoreStore is the only possible case left?

Sometimes MemBarRelease is added [1] which can degenerate into 
MemBarCPUOrder [2].

I'd prefer to see all the barriers which are linked to the allocation be 
removed.

Best regards,
Vladimir Ivanov

[1] 
http://hg.openjdk.java.net/jdk/jdk/file/tip/src/hotspot/share/opto/parse1.cpp#l1005

[2] 
http://hg.openjdk.java.net/jdk/jdk/file/tip/src/hotspot/share/opto/escape.cpp#l1912

> On 2020-02-18 14:01, Tobias Hartmann wrote:
>> On 18.02.20 13:32, Vladimir Ivanov wrote:
>>> In case of MemBar I assume you are handling the precedence edge 
>>> (MemBarNode::Precedent). Why do you
>>> replace it with TOP? I assume you want to eliminate the barrier, but 
>>> I don't see how it helps.
>> Actually, you might want to use MemBarNode::remove.
>>
>> Best regards,
>> Tobias


More information about the hotspot-compiler-dev mailing list