src/hotspot/share/opto/matcher.cpp
changeset 55227 63a62cc10a0a
parent 54780 f8d182aedc92
child 58516 d376d86b0a01
equal deleted inserted replaced
55226:ce8bab2c4185 55227:63a62cc10a0a
  2064       }
  2064       }
  2065       if (is_visited(n)) {   // Visited already?
  2065       if (is_visited(n)) {   // Visited already?
  2066         // Node is shared and has no reason to clone.  Flag it as shared.
  2066         // Node is shared and has no reason to clone.  Flag it as shared.
  2067         // This causes it to match into a register for the sharing.
  2067         // This causes it to match into a register for the sharing.
  2068         set_shared(n);       // Flag as shared and
  2068         set_shared(n);       // Flag as shared and
       
  2069         if (n->is_DecodeNarrowPtr()) {
       
  2070           // Oop field/array element loads must be shared but since
       
  2071           // they are shared through a DecodeN they may appear to have
       
  2072           // a single use so force sharing here.
       
  2073           set_shared(n->in(1));
       
  2074         }
  2069         mstack.pop();        // remove node from stack
  2075         mstack.pop();        // remove node from stack
  2070         continue;
  2076         continue;
  2071       }
  2077       }
  2072       nstate = Visit; // Not already visited; so visit now
  2078       nstate = Visit; // Not already visited; so visit now
  2073     }
  2079     }
  2094         // expect the allocator to haul the flags from the int-side to the
  2100         // expect the allocator to haul the flags from the int-side to the
  2095         // fp-side.  No can do.
  2101         // fp-side.  No can do.
  2096         if( _must_clone[mop] ) {
  2102         if( _must_clone[mop] ) {
  2097           mstack.push(m, Visit);
  2103           mstack.push(m, Visit);
  2098           continue; // for(int i = ...)
  2104           continue; // for(int i = ...)
  2099         }
       
  2100 
       
  2101         if( mop == Op_AddP && m->in(AddPNode::Base)->is_DecodeNarrowPtr()) {
       
  2102           // Bases used in addresses must be shared but since
       
  2103           // they are shared through a DecodeN they may appear
       
  2104           // to have a single use so force sharing here.
       
  2105           set_shared(m->in(AddPNode::Base)->in(1));
       
  2106         }
  2105         }
  2107 
  2106 
  2108         // if 'n' and 'm' are part of a graph for BMI instruction, clone this node.
  2107         // if 'n' and 'm' are part of a graph for BMI instruction, clone this node.
  2109 #ifdef X86
  2108 #ifdef X86
  2110         if (UseBMI1Instructions && is_bmi_pattern(n, m)) {
  2109         if (UseBMI1Instructions && is_bmi_pattern(n, m)) {