< prev index next > src/hotspot/share/opto/multnode.cpp
Print this page
/*
! * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
/*
! * Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
//------------------------------MultiNode--------------------------------------
const RegMask &MultiNode::out_RegMask() const {
return RegMask::EMPTY;
}
! Node *MultiNode::match( const ProjNode *proj, const Matcher *m ) { return proj->clone(); }
//------------------------------proj_out---------------------------------------
// Get a named projection or null if not found
ProjNode* MultiNode::proj_out_or_null(uint which_proj) const {
assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || which_proj == (uint)true || which_proj == (uint)false, "must be 1 or 0");
//------------------------------MultiNode--------------------------------------
const RegMask &MultiNode::out_RegMask() const {
return RegMask::EMPTY;
}
! Node *MultiNode::match(const ProjNode *proj, const Matcher *m, const RegMask* mask) { return proj->clone(); }
//------------------------------proj_out---------------------------------------
// Get a named projection or null if not found
ProjNode* MultiNode::proj_out_or_null(uint which_proj) const {
assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || which_proj == (uint)true || which_proj == (uint)false, "must be 1 or 0");
Node* ctrl = in(0);
if (ctrl->Opcode() == Op_Tuple) {
// Jumping over Tuples: the i-th projection of a Tuple is the i-th input of the Tuple.
ctrl = ctrl->in(_con);
}
! if (ctrl == nullptr) return nullptr; // node is dead
const TypePtr* adr_type = ctrl->adr_type();
#ifdef ASSERT
if (!VMError::is_error_reported() && !Node::in_dump())
assert(adr_type != nullptr, "source must have adr_type");
#endif
Node* ctrl = in(0);
if (ctrl->Opcode() == Op_Tuple) {
// Jumping over Tuples: the i-th projection of a Tuple is the i-th input of the Tuple.
ctrl = ctrl->in(_con);
}
! // node is dead or we are in the process of removing a dead subgraph
+ if (ctrl == nullptr || ctrl->is_top()) {
+ return nullptr;
+ }
const TypePtr* adr_type = ctrl->adr_type();
#ifdef ASSERT
if (!VMError::is_error_reported() && !Node::in_dump())
assert(adr_type != nullptr, "source must have adr_type");
#endif
< prev index next >