src/share/vm/opto/loopopts.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/loopopts.cpp Tue Jul 26 12:22:05 2011
--- new/src/share/vm/opto/loopopts.cpp Tue Jul 26 12:22:04 2011
*** 192,202 ****
--- 192,202 ----
//------------------------------dominated_by------------------------------------
// Replace the dominated test with an obvious true or false. Place it on the
// IGVN worklist for later cleanup. Move control-dependent data Nodes on the
// live path up to the dominating control.
! void PhaseIdealLoop::dominated_by( Node *prevdom, Node *iff, bool flip, bool exclude_loop_predicate ) {
#ifndef PRODUCT
if (VerifyLoopOptimizations && PrintOpto) tty->print_cr("dominating test");
#endif
*** 226,236 ****
--- 226,245 ----
if (iff->outcnt() != 2) return;
// Make control-dependent data Nodes on the live path (path that will remain
// once the dominated IF is removed) become control-dependent on the
// dominating projection.
! Node* dp = ((IfNode*)iff)->proj_out(pop == Op_IfTrue);
! Node* dp = iff->as_If()->proj_out(pop == Op_IfTrue);
+
+ // Loop predicates may have depending checks which should not
+ // be skipped. For example, range check predicate has two checks
+ // for lower and upper bounds.
+ ProjNode* unc_proj = iff->as_If()->proj_out(1 - dp->as_Proj()->_con)->as_Proj();
+ if (exclude_loop_predicate &&
+ is_uncommon_trap_proj(unc_proj, Deoptimization::Reason_predicate))
+ return;
+
IdealLoopTree *old_loop = get_loop(dp);
for (DUIterator_Fast imax, i = dp->fast_outs(imax); i < imax; i++) {
Node* cd = dp->fast_out(i); // Control-dependent node
if (cd->depends_only_on_test()) {
*** 857,867 ****
--- 866,876 ----
while( dom != cutoff ) {
if( dom->req() > 1 && dom->in(1) == bol && prevdom->in(0) == dom ) {
// Replace the dominated test with an obvious true or false.
// Place it on the IGVN worklist for later cleanup.
C->set_major_progress();
! dominated_by( prevdom, n, false, true );
#ifndef PRODUCT
if( VerifyLoopOptimizations ) verify();
#endif
return;
}
src/share/vm/opto/loopopts.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File