src/share/vm/opto/loopopts.cpp

Print this page




   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "incls/_precompiled.incl"
  26 #include "incls/_loopopts.cpp.incl"







  27 
  28 //=============================================================================
  29 //------------------------------split_thru_phi---------------------------------
  30 // Split Node 'n' through merge point if there is enough win.
  31 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
  32   if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) {
  33     // ConvI2L may have type information on it which is unsafe to push up
  34     // so disable this for now
  35     return NULL;
  36   }
  37   int wins = 0;
  38   assert( !n->is_CFG(), "" );
  39   assert( region->is_Region(), "" );
  40 
  41   const Type* type = n->bottom_type();
  42   const TypeOopPtr *t_oop = _igvn.type(n)->isa_oopptr();
  43   Node *phi;
  44   if( t_oop != NULL && t_oop->is_known_instance_field() ) {
  45     int iid    = t_oop->instance_id();
  46     int index  = C->get_alias_index(t_oop);




   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "memory/allocation.inline.hpp"
  27 #include "opto/addnode.hpp"
  28 #include "opto/connode.hpp"
  29 #include "opto/divnode.hpp"
  30 #include "opto/loopnode.hpp"
  31 #include "opto/mulnode.hpp"
  32 #include "opto/rootnode.hpp"
  33 #include "opto/subnode.hpp"
  34 
  35 //=============================================================================
  36 //------------------------------split_thru_phi---------------------------------
  37 // Split Node 'n' through merge point if there is enough win.
  38 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
  39   if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) {
  40     // ConvI2L may have type information on it which is unsafe to push up
  41     // so disable this for now
  42     return NULL;
  43   }
  44   int wins = 0;
  45   assert( !n->is_CFG(), "" );
  46   assert( region->is_Region(), "" );
  47 
  48   const Type* type = n->bottom_type();
  49   const TypeOopPtr *t_oop = _igvn.type(n)->isa_oopptr();
  50   Node *phi;
  51   if( t_oop != NULL && t_oop->is_known_instance_field() ) {
  52     int iid    = t_oop->instance_id();
  53     int index  = C->get_alias_index(t_oop);