16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "opto/callnode.hpp"
27 #include "opto/cfgnode.hpp"
28 #include "opto/matcher.hpp"
29 #include "opto/mathexactnode.hpp"
30 #include "opto/multnode.hpp"
31 #include "opto/opcodes.hpp"
32 #include "opto/phaseX.hpp"
33 #include "opto/regmask.hpp"
34 #include "opto/type.hpp"
35 #include "utilities/vmError.hpp"
36 #include "utilities/macros.hpp"
37 #if INCLUDE_SHENANDOAHGC
38 #include "gc/shenandoah/c2/shenandoahSupport.hpp"
39 #endif
40
41 //=============================================================================
42 //------------------------------MultiNode--------------------------------------
43 const RegMask &MultiNode::out_RegMask() const {
44 return RegMask::Empty;
45 }
46
47 Node *MultiNode::match( const ProjNode *proj, const Matcher *m ) { return proj->clone(); }
48
49 //------------------------------proj_out---------------------------------------
50 // Get a named projection or null if not found
51 ProjNode* MultiNode::proj_out_or_null(uint which_proj) const {
52 assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || which_proj == (uint)true || which_proj == (uint)false, "must be 1 or 0");
53 assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || outcnt() == 2, "bad if #1");
54 for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
55 Node *p = fast_out(i);
56 if (p->is_Proj()) {
57 ProjNode *proj = p->as_Proj();
58 if (proj->_con == which_proj) {
59 assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || proj->Opcode() == (which_proj ? Op_IfTrue : Op_IfFalse), "bad if #2");
|
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "opto/callnode.hpp"
27 #include "opto/cfgnode.hpp"
28 #include "opto/matcher.hpp"
29 #include "opto/mathexactnode.hpp"
30 #include "opto/multnode.hpp"
31 #include "opto/opcodes.hpp"
32 #include "opto/phaseX.hpp"
33 #include "opto/regmask.hpp"
34 #include "opto/type.hpp"
35 #include "utilities/vmError.hpp"
36
37 //=============================================================================
38 //------------------------------MultiNode--------------------------------------
39 const RegMask &MultiNode::out_RegMask() const {
40 return RegMask::Empty;
41 }
42
43 Node *MultiNode::match( const ProjNode *proj, const Matcher *m ) { return proj->clone(); }
44
45 //------------------------------proj_out---------------------------------------
46 // Get a named projection or null if not found
47 ProjNode* MultiNode::proj_out_or_null(uint which_proj) const {
48 assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || which_proj == (uint)true || which_proj == (uint)false, "must be 1 or 0");
49 assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || outcnt() == 2, "bad if #1");
50 for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
51 Node *p = fast_out(i);
52 if (p->is_Proj()) {
53 ProjNode *proj = p->as_Proj();
54 if (proj->_con == which_proj) {
55 assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || proj->Opcode() == (which_proj ? Op_IfTrue : Op_IfFalse), "bad if #2");
|