Mercurial > hg > graal-compiler
comparison src/share/vm/opto/multnode.cpp @ 12816:2720ab7a0d70
Merge
author | ccheung |
---|---|
date | Fri, 04 Oct 2013 21:00:43 -0700 |
parents | c9ccd7b85f20 |
children | 3213ba4d3dff |
comparison
equal
deleted
inserted
replaced
12815:4212bfb33d76 | 12816:2720ab7a0d70 |
---|---|
23 */ | 23 */ |
24 | 24 |
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "opto/callnode.hpp" | 26 #include "opto/callnode.hpp" |
27 #include "opto/matcher.hpp" | 27 #include "opto/matcher.hpp" |
28 #include "opto/mathexactnode.hpp" | |
28 #include "opto/multnode.hpp" | 29 #include "opto/multnode.hpp" |
29 #include "opto/opcodes.hpp" | 30 #include "opto/opcodes.hpp" |
30 #include "opto/phaseX.hpp" | 31 #include "opto/phaseX.hpp" |
31 #include "opto/regmask.hpp" | 32 #include "opto/regmask.hpp" |
32 #include "opto/type.hpp" | 33 #include "opto/type.hpp" |
44 ProjNode* MultiNode::proj_out(uint which_proj) const { | 45 ProjNode* MultiNode::proj_out(uint which_proj) const { |
45 assert(Opcode() != Op_If || which_proj == (uint)true || which_proj == (uint)false, "must be 1 or 0"); | 46 assert(Opcode() != Op_If || which_proj == (uint)true || which_proj == (uint)false, "must be 1 or 0"); |
46 assert(Opcode() != Op_If || outcnt() == 2, "bad if #1"); | 47 assert(Opcode() != Op_If || outcnt() == 2, "bad if #1"); |
47 for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) { | 48 for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) { |
48 Node *p = fast_out(i); | 49 Node *p = fast_out(i); |
49 if( !p->is_Proj() ) { | 50 if (p->is_Proj()) { |
51 ProjNode *proj = p->as_Proj(); | |
52 if (proj->_con == which_proj) { | |
53 assert(Opcode() != Op_If || proj->Opcode() == (which_proj?Op_IfTrue:Op_IfFalse), "bad if #2"); | |
54 return proj; | |
55 } | |
56 } else if (p->is_FlagsProj()) { | |
57 FlagsProjNode *proj = p->as_FlagsProj(); | |
58 if (proj->_con == which_proj) { | |
59 return proj; | |
60 } | |
61 } else { | |
50 assert(p == this && this->is_Start(), "else must be proj"); | 62 assert(p == this && this->is_Start(), "else must be proj"); |
51 continue; | 63 continue; |
52 } | |
53 ProjNode *proj = p->as_Proj(); | |
54 if( proj->_con == which_proj ) { | |
55 assert(Opcode() != Op_If || proj->Opcode() == (which_proj?Op_IfTrue:Op_IfFalse), "bad if #2"); | |
56 return proj; | |
57 } | 64 } |
58 } | 65 } |
59 return NULL; | 66 return NULL; |
60 } | 67 } |
61 | 68 |