< prev index next >

src/hotspot/share/opto/loopopts.cpp

Print this page




  24 
  25 #include "precompiled.hpp"
  26 #include "gc/shared/barrierSet.hpp"
  27 #include "gc/shared/c2/barrierSetC2.hpp"
  28 #include "memory/allocation.inline.hpp"
  29 #include "memory/resourceArea.hpp"
  30 #include "opto/addnode.hpp"
  31 #include "opto/callnode.hpp"
  32 #include "opto/castnode.hpp"
  33 #include "opto/connode.hpp"
  34 #include "opto/castnode.hpp"
  35 #include "opto/divnode.hpp"
  36 #include "opto/loopnode.hpp"
  37 #include "opto/matcher.hpp"
  38 #include "opto/mulnode.hpp"
  39 #include "opto/movenode.hpp"
  40 #include "opto/opaquenode.hpp"
  41 #include "opto/rootnode.hpp"
  42 #include "opto/subnode.hpp"
  43 #include "utilities/macros.hpp"
  44 #if INCLUDE_ZGC
  45 #include "gc/z/c2/zBarrierSetC2.hpp"
  46 #endif
  47 
  48 //=============================================================================
  49 //------------------------------split_thru_phi---------------------------------
  50 // Split Node 'n' through merge point if there is enough win.
  51 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
  52   if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) {
  53     // ConvI2L may have type information on it which is unsafe to push up
  54     // so disable this for now
  55     return NULL;
  56   }
  57 
  58   // Splitting range check CastIIs through a loop induction Phi can
  59   // cause new Phis to be created that are left unrelated to the loop
  60   // induction Phi and prevent optimizations (vectorization)
  61   if (n->Opcode() == Op_CastII && n->as_CastII()->has_range_check() &&
  62       region->is_CountedLoop() && n->in(1) == region->as_CountedLoop()->phi()) {
  63     return NULL;
  64   }
  65 
  66   int wins = 0;




  24 
  25 #include "precompiled.hpp"
  26 #include "gc/shared/barrierSet.hpp"
  27 #include "gc/shared/c2/barrierSetC2.hpp"
  28 #include "memory/allocation.inline.hpp"
  29 #include "memory/resourceArea.hpp"
  30 #include "opto/addnode.hpp"
  31 #include "opto/callnode.hpp"
  32 #include "opto/castnode.hpp"
  33 #include "opto/connode.hpp"
  34 #include "opto/castnode.hpp"
  35 #include "opto/divnode.hpp"
  36 #include "opto/loopnode.hpp"
  37 #include "opto/matcher.hpp"
  38 #include "opto/mulnode.hpp"
  39 #include "opto/movenode.hpp"
  40 #include "opto/opaquenode.hpp"
  41 #include "opto/rootnode.hpp"
  42 #include "opto/subnode.hpp"
  43 #include "utilities/macros.hpp"



  44 
  45 //=============================================================================
  46 //------------------------------split_thru_phi---------------------------------
  47 // Split Node 'n' through merge point if there is enough win.
  48 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
  49   if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) {
  50     // ConvI2L may have type information on it which is unsafe to push up
  51     // so disable this for now
  52     return NULL;
  53   }
  54 
  55   // Splitting range check CastIIs through a loop induction Phi can
  56   // cause new Phis to be created that are left unrelated to the loop
  57   // induction Phi and prevent optimizations (vectorization)
  58   if (n->Opcode() == Op_CastII && n->as_CastII()->has_range_check() &&
  59       region->is_CountedLoop() && n->in(1) == region->as_CountedLoop()->phi()) {
  60     return NULL;
  61   }
  62 
  63   int wins = 0;


< prev index next >