comparison src/share/vm/opto/loopnode.cpp @ 12956:3213ba4d3dff

8024069: replace_in_map() should operate on parent maps Summary: type information gets lost because replace_in_map() doesn't update parent maps Reviewed-by: kvn, twisti
author roland
date Sat, 19 Oct 2013 12:16:43 +0200
parents f2110083203d
children cd3c534f8f4a
comparison
equal deleted inserted replaced
12955:252d541466ea 12956:3213ba4d3dff
165 // confuses loop predication. So once we hit a Loop in a If branch 165 // confuses loop predication. So once we hit a Loop in a If branch
166 // that doesn't branch to an UNC, we stop. The code that process 166 // that doesn't branch to an UNC, we stop. The code that process
167 // expensive nodes will notice the loop and skip over it to try to 167 // expensive nodes will notice the loop and skip over it to try to
168 // move the node further up. 168 // move the node further up.
169 if (ctl->is_CountedLoop() && ctl->in(1) != NULL && ctl->in(1)->in(0) != NULL && ctl->in(1)->in(0)->is_If()) { 169 if (ctl->is_CountedLoop() && ctl->in(1) != NULL && ctl->in(1)->in(0) != NULL && ctl->in(1)->in(0)->is_If()) {
170 if (!is_uncommon_trap_if_pattern(ctl->in(1)->as_Proj(), Deoptimization::Reason_none)) { 170 if (!ctl->in(1)->as_Proj()->is_uncommon_trap_if_pattern(Deoptimization::Reason_none)) {
171 break; 171 break;
172 } 172 }
173 next = idom(ctl->in(1)->in(0)); 173 next = idom(ctl->in(1)->in(0));
174 } else if (ctl->is_Proj()) { 174 } else if (ctl->is_Proj()) {
175 // We only move it up along a projection if the projection is 175 // We only move it up along a projection if the projection is
179 if (parent_ctl == NULL) { 179 if (parent_ctl == NULL) {
180 break; 180 break;
181 } else if (parent_ctl->is_CountedLoopEnd() && parent_ctl->as_CountedLoopEnd()->loopnode() != NULL) { 181 } else if (parent_ctl->is_CountedLoopEnd() && parent_ctl->as_CountedLoopEnd()->loopnode() != NULL) {
182 next = parent_ctl->as_CountedLoopEnd()->loopnode()->init_control(); 182 next = parent_ctl->as_CountedLoopEnd()->loopnode()->init_control();
183 } else if (parent_ctl->is_If()) { 183 } else if (parent_ctl->is_If()) {
184 if (!is_uncommon_trap_if_pattern(ctl->as_Proj(), Deoptimization::Reason_none)) { 184 if (!ctl->as_Proj()->is_uncommon_trap_if_pattern(Deoptimization::Reason_none)) {
185 break; 185 break;
186 } 186 }
187 assert(idom(ctl) == parent_ctl, "strange"); 187 assert(idom(ctl) == parent_ctl, "strange");
188 next = idom(parent_ctl); 188 next = idom(parent_ctl);
189 } else if (ctl->is_CatchProj()) { 189 } else if (ctl->is_CatchProj()) {