RFR: 8296545: C2 Blackholes should allow load optimizations [v2]

Aleksey Shipilev shade at openjdk.org
Thu Nov 10 10:46:26 UTC 2022


On Wed, 9 Nov 2022 20:29:13 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Do not touch memory at all
>
> src/hotspot/share/opto/library_call.cpp line 7784:
> 
>> 7782:   // side effects like breaking the optimizations across the blackhole.
>> 7783: 
>> 7784:   MemBarNode* mb = MemBarNode::make(C, Op_Blackhole);
> 
> One thing to clear if you decide to keep modeling it as `MemBar`: pass `AliasIdxTop` as `alias_idx` .

OK, I need to understand why, though. Does passing `AliasIdxTop` sentinel value here protects us from accidentally doing memory merges over the Blackhole node that does not touch memory? Is that the idea, or there is some other reason for it?

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

PR: https://git.openjdk.org/jdk/pull/11041


More information about the hotspot-compiler-dev mailing list