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 for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
50 Node *p = fast_out(i);
51 if (p->is_Proj()) {
52 ProjNode *proj = p->as_Proj();
53 if (proj->_con == which_proj) {
54 assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || proj->Opcode() == (which_proj ? Op_IfTrue : Op_IfFalse), "bad if #2");
55 return proj;
56 }
57 } else {
58 assert(p == this && this->is_Start(), "else must be proj");
59 continue;
60 }
61 }
62 return nullptr;
63 }
|
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, const RegMask* mask) { 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 for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
50 Node *p = fast_out(i);
51 if (p->is_Proj()) {
52 ProjNode *proj = p->as_Proj();
53 if (proj->_con == which_proj) {
54 assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || proj->Opcode() == (which_proj ? Op_IfTrue : Op_IfFalse), "bad if #2");
55 return proj;
56 }
57 } else {
58 assert(p == this && this->is_Start(), "else must be proj");
59 continue;
60 }
61 }
62 return nullptr;
63 }
|