RFR: 8286179: Node::find(int) should not traverse from new to old nodes [v2]

Emanuel Peter duke at openjdk.java.net
Mon May 9 14:07:48 UTC 2022


On Mon, 9 May 2022 13:04:03 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   added nullprt check for old_root
>
> src/hotspot/share/opto/node.cpp line 1617:
> 
>> 1615: Node* find_old_node(const int idx) {
>> 1616:   Node* root = old_root();
>> 1617:   assert(root != nullptr, "must have old_root() to find old nodes");
> 
> I think it's better to avoid assertions here and below and do nothing instead (you already print a warning in `old_root()` which is fine I think) since it would crash and stop the current debugging session.

Ok, personally verified with @chhagedorn , his idea was to return `nullptr`, will do that now.

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

PR: https://git.openjdk.java.net/jdk/pull/8567


More information about the hotspot-compiler-dev mailing list