1668 if( i == 0 ) { // Set control for first prefetch, next follows it
1669 prefetch->init_req(0, needgc_false);
1670 }
1671 transform_later(prefetch);
1672 distance += step_size;
1673 i_o = prefetch;
1674 }
1675 }
1676 return i_o;
1677 }
1678
1679
1680 void PhaseMacroExpand::expand_allocate(AllocateNode *alloc) {
1681 expand_allocate_common(alloc, NULL,
1682 OptoRuntime::new_instance_Type(),
1683 OptoRuntime::new_instance_Java());
1684 }
1685
1686 void PhaseMacroExpand::expand_allocate_array(AllocateArrayNode *alloc) {
1687 Node* length = alloc->in(AllocateNode::ALength);
1688 expand_allocate_common(alloc, length,
1689 OptoRuntime::new_array_Type(),
1690 OptoRuntime::new_array_Java());
1691 }
1692
1693 //-----------------------mark_eliminated_locking_nodes-----------------------
1694 // During EA obj may point to several objects but after few ideal graph
1695 // transformations (CCP) it may point to only one non escaping object
1696 // (but still using phi), corresponding locks and unlocks will be marked
1697 // for elimination. Later obj could be replaced with a new node (new phi)
1698 // and which does not have escape information. And later after some graph
1699 // reshape other locks and unlocks (which were not marked for elimination
1700 // before) are connected to this new obj (phi) but they still will not be
1701 // marked for elimination since new obj has no escape information.
1702 // Mark all associated (same box and obj) lock and unlock nodes for
1703 // elimination if some of them marked already.
1704 void PhaseMacroExpand::mark_eliminated_locking_nodes(AbstractLockNode *alock) {
1705 if (!alock->is_eliminated()) {
1706 return;
1707 }
1708 if (!alock->is_coarsened()) { // Eliminated by EA
1709 // Create new "eliminated" BoxLock node and use it
1710 // in monitor debug info for the same object.
|
1668 if( i == 0 ) { // Set control for first prefetch, next follows it
1669 prefetch->init_req(0, needgc_false);
1670 }
1671 transform_later(prefetch);
1672 distance += step_size;
1673 i_o = prefetch;
1674 }
1675 }
1676 return i_o;
1677 }
1678
1679
1680 void PhaseMacroExpand::expand_allocate(AllocateNode *alloc) {
1681 expand_allocate_common(alloc, NULL,
1682 OptoRuntime::new_instance_Type(),
1683 OptoRuntime::new_instance_Java());
1684 }
1685
1686 void PhaseMacroExpand::expand_allocate_array(AllocateArrayNode *alloc) {
1687 Node* length = alloc->in(AllocateNode::ALength);
1688 InitializeNode* init = alloc->initialization();
1689 Node* klass_node = alloc->in(AllocateNode::KlassNode);
1690 ciKlass* k = _igvn.type(klass_node)->is_klassptr()->klass();
1691 address slow_call_address; // Address of slow call
1692 if (init != NULL && init->is_complete_with_arraycopy() &&
1693 k->is_type_array_klass()) {
1694 // Don't zero type array during slow allocation in VM since
1695 // it will be initialized later by arraycopy in compiled code.
1696 slow_call_address = OptoRuntime::new_array_nozero_Java();
1697 } else {
1698 slow_call_address = OptoRuntime::new_array_Java();
1699 }
1700 expand_allocate_common(alloc, length,
1701 OptoRuntime::new_array_Type(),
1702 slow_call_address);
1703 }
1704
1705 //-----------------------mark_eliminated_locking_nodes-----------------------
1706 // During EA obj may point to several objects but after few ideal graph
1707 // transformations (CCP) it may point to only one non escaping object
1708 // (but still using phi), corresponding locks and unlocks will be marked
1709 // for elimination. Later obj could be replaced with a new node (new phi)
1710 // and which does not have escape information. And later after some graph
1711 // reshape other locks and unlocks (which were not marked for elimination
1712 // before) are connected to this new obj (phi) but they still will not be
1713 // marked for elimination since new obj has no escape information.
1714 // Mark all associated (same box and obj) lock and unlock nodes for
1715 // elimination if some of them marked already.
1716 void PhaseMacroExpand::mark_eliminated_locking_nodes(AbstractLockNode *alock) {
1717 if (!alock->is_eliminated()) {
1718 return;
1719 }
1720 if (!alock->is_coarsened()) { // Eliminated by EA
1721 // Create new "eliminated" BoxLock node and use it
1722 // in monitor debug info for the same object.
|