src/share/vm/opto/loopTransform.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6930116 Sdiff src/share/vm/opto

src/share/vm/opto/loopTransform.cpp

Print this page




1768         if (!must_reason_predicate || reason == Deoptimization::Reason_predicate){
1769            return true;
1770         }
1771       }
1772       return false; // don't do further after call
1773     }
1774   }
1775   return false;
1776 }
1777 
1778 //-------------------------------is_uncommon_trap_if_pattern-------------------------
1779 // Return true  for "if(test)-> proj -> ...
1780 //                          |
1781 //                          V
1782 //                      other_proj->[region->..]call_uct"
1783 //
1784 // "must_reason_predicate" means the uct reason must be Reason_predicate
1785 bool PhaseIdealLoop::is_uncommon_trap_if_pattern(ProjNode *proj, bool must_reason_predicate) {
1786   Node *in0 = proj->in(0);
1787   if (!in0->is_If()) return false;


1788   IfNode* iff = in0->as_If();
1789 
1790   // we need "If(Conv2B(Opaque1(...)))" pattern for must_reason_predicate
1791   if (must_reason_predicate) {
1792     if (iff->in(1)->Opcode() != Op_Conv2B ||
1793        iff->in(1)->in(1)->Opcode() != Op_Opaque1) {
1794       return false;
1795     }
1796   }
1797 
1798   ProjNode* other_proj = iff->proj_out(1-proj->_con)->as_Proj();
1799   return is_uncommon_trap_proj(other_proj, must_reason_predicate);
1800 }
1801 
1802 //------------------------------create_new_if_for_predicate------------------------
1803 // create a new if above the uct_if_pattern for the predicate to be promoted.
1804 //
1805 //          before                                after
1806 //        ----------                           ----------
1807 //           ctrl                                 ctrl




1768         if (!must_reason_predicate || reason == Deoptimization::Reason_predicate){
1769            return true;
1770         }
1771       }
1772       return false; // don't do further after call
1773     }
1774   }
1775   return false;
1776 }
1777 
1778 //-------------------------------is_uncommon_trap_if_pattern-------------------------
1779 // Return true  for "if(test)-> proj -> ...
1780 //                          |
1781 //                          V
1782 //                      other_proj->[region->..]call_uct"
1783 //
1784 // "must_reason_predicate" means the uct reason must be Reason_predicate
1785 bool PhaseIdealLoop::is_uncommon_trap_if_pattern(ProjNode *proj, bool must_reason_predicate) {
1786   Node *in0 = proj->in(0);
1787   if (!in0->is_If()) return false;
1788   // Variation of a dead If node.
1789   if (in0->outcnt() < 2)  return false;
1790   IfNode* iff = in0->as_If();
1791 
1792   // we need "If(Conv2B(Opaque1(...)))" pattern for must_reason_predicate
1793   if (must_reason_predicate) {
1794     if (iff->in(1)->Opcode() != Op_Conv2B ||
1795        iff->in(1)->in(1)->Opcode() != Op_Opaque1) {
1796       return false;
1797     }
1798   }
1799 
1800   ProjNode* other_proj = iff->proj_out(1-proj->_con)->as_Proj();
1801   return is_uncommon_trap_proj(other_proj, must_reason_predicate);
1802 }
1803 
1804 //------------------------------create_new_if_for_predicate------------------------
1805 // create a new if above the uct_if_pattern for the predicate to be promoted.
1806 //
1807 //          before                                after
1808 //        ----------                           ----------
1809 //           ctrl                                 ctrl


src/share/vm/opto/loopTransform.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File