RFR: 8298952: All nodes should have type(n) == Value(n) after IGVN [v3]

Tobias Hartmann thartmann at openjdk.org
Wed Feb 1 11:20:59 UTC 2023


On Tue, 31 Jan 2023 09:39:01 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/node.hpp line 415:
>> 
>>> 413: #ifdef ASSERT
>>> 414:   bool is_dead() const;
>>> 415:   static bool is_not_dead(const Node* n);
>> 
>> Should this be non-static?
>
> I will leave it as is.
> There is a `nullptr` check, so we cannot do `n->is_not_dead()`, that would be undefined behavior if `n == nullptr`. Doing the `nullptr` check at every call-site also is not a nicer alternative.

Right, I missed that.

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

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


More information about the hotspot-compiler-dev mailing list