RFR: 8322694: C1: Handle Constant and IfOp in NullCheckEliminator [v2]

Denghui Dong ddong at openjdk.org
Wed Jan 3 13:37:21 UTC 2024


On Wed, 3 Jan 2024 12:22:43 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Denghui Dong has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update
>
> src/hotspot/share/c1/c1_Optimizer.cpp line 888:
> 
>> 886:     mark_visitable(instr);
>> 887:     if (instr->is_pinned() || instr->can_trap() || (instr->as_NullCheck() != nullptr)
>> 888:         || (instr->as_Constant() != nullptr && instr->as_Constant()->type()->is_object())) {
> 
> Is this just `instr->as_ObjectConstant() != nullptr`?

Do you mean `insr->type()->as_ObjectConstant() != nullptr`?
But we should include other Constants (e.g. `ArrayConstant`, `InstanceConstant`), and those classes don't implement `as_ObjectConstant`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17191#discussion_r1440457024


More information about the hotspot-compiler-dev mailing list