RFR: 8322694: C1: Handle Constant and IfOp in NullCheckEliminator [v2]
Aleksey Shipilev
shade at openjdk.org
Thu Jan 4 08:47:22 UTC 2024
On Wed, 3 Jan 2024 13:32:32 GMT, Denghui Dong <ddong at openjdk.org> wrote:
>> 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`
Ah, OK then. Yes, I thought ObjectConstant includes ArrayConstant and InstanceConstant.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17191#discussion_r1441479817
More information about the hotspot-compiler-dev
mailing list