src/hotspot/share/opto/graphKit.cpp
changeset 51705 8123901bc3d1
parent 51514 1e332d63bd96
child 51880 ec4c3c287ca7
equal deleted inserted replaced
51704:2368e8e9cec6 51705:8123901bc3d1
  1696 void GraphKit::access_clone(Node* ctl, Node* src, Node* dst, Node* size, bool is_array) {
  1696 void GraphKit::access_clone(Node* ctl, Node* src, Node* dst, Node* size, bool is_array) {
  1697   set_control(ctl);
  1697   set_control(ctl);
  1698   return _barrier_set->clone(this, src, dst, size, is_array);
  1698   return _barrier_set->clone(this, src, dst, size, is_array);
  1699 }
  1699 }
  1700 
  1700 
       
  1701 Node* GraphKit::access_resolve(Node* n, DecoratorSet decorators) {
       
  1702   // Use stronger ACCESS_WRITE|ACCESS_READ by default.
       
  1703   if ((decorators & (ACCESS_READ | ACCESS_WRITE)) == 0) {
       
  1704     decorators |= ACCESS_READ | ACCESS_WRITE;
       
  1705   }
       
  1706   return _barrier_set->resolve(this, n, decorators);
       
  1707 }
       
  1708 
  1701 //-------------------------array_element_address-------------------------
  1709 //-------------------------array_element_address-------------------------
  1702 Node* GraphKit::array_element_address(Node* ary, Node* idx, BasicType elembt,
  1710 Node* GraphKit::array_element_address(Node* ary, Node* idx, BasicType elembt,
  1703                                       const TypeInt* sizetype, Node* ctrl) {
  1711                                       const TypeInt* sizetype, Node* ctrl) {
  1704   uint shift  = exact_log2(type2aelembytes(elembt));
  1712   uint shift  = exact_log2(type2aelembytes(elembt));
  1705   uint header = arrayOopDesc::base_offset_in_bytes(elembt);
  1713   uint header = arrayOopDesc::base_offset_in_bytes(elembt);
  3231   if (stopped())                // Dead monitor?
  3239   if (stopped())                // Dead monitor?
  3232     return NULL;
  3240     return NULL;
  3233 
  3241 
  3234   assert(dead_locals_are_killed(), "should kill locals before sync. point");
  3242   assert(dead_locals_are_killed(), "should kill locals before sync. point");
  3235 
  3243 
       
  3244   obj = access_resolve(obj, ACCESS_READ | ACCESS_WRITE);
       
  3245 
  3236   // Box the stack location
  3246   // Box the stack location
  3237   Node* box = _gvn.transform(new BoxLockNode(next_monitor()));
  3247   Node* box = _gvn.transform(new BoxLockNode(next_monitor()));
  3238   Node* mem = reset_memory();
  3248   Node* mem = reset_memory();
  3239 
  3249 
  3240   FastLockNode * flock = _gvn.transform(new FastLockNode(0, obj, box) )->as_FastLock();
  3250   FastLockNode * flock = _gvn.transform(new FastLockNode(0, obj, box) )->as_FastLock();
  3948    * int i_char = start;
  3958    * int i_char = start;
  3949    * for (int i_byte = 0; i_byte < count; i_byte++) {
  3959    * for (int i_byte = 0; i_byte < count; i_byte++) {
  3950    *   dst[i_char++] = (char)(src[i_byte] & 0xff);
  3960    *   dst[i_char++] = (char)(src[i_byte] & 0xff);
  3951    * }
  3961    * }
  3952    */
  3962    */
       
  3963   src = access_resolve(src, ACCESS_READ);
       
  3964   dst = access_resolve(dst, ACCESS_WRITE);
  3953   add_predicate();
  3965   add_predicate();
  3954   RegionNode* head = new RegionNode(3);
  3966   RegionNode* head = new RegionNode(3);
  3955   head->init_req(1, control());
  3967   head->init_req(1, control());
  3956   gvn().set_type(head, Type::CONTROL);
  3968   gvn().set_type(head, Type::CONTROL);
  3957   record_for_igvn(head);
  3969   record_for_igvn(head);