< prev index next >

src/share/vm/opto/macro.cpp

Print this page




1368       Node* alloc_size = new (C) ConvI2LNode(size_in_bytes);
1369       transform_later(alloc_size);
1370 #endif
1371       Node* new_alloc_bytes = new (C) AddLNode(alloc_bytes, alloc_size);
1372       transform_later(new_alloc_bytes);
1373       fast_oop_rawmem = make_store(fast_oop_ctrl, store_eden_top, alloc_bytes_adr,
1374                                    0, new_alloc_bytes, T_LONG);
1375     }
1376 
1377     InitializeNode* init = alloc->initialization();
1378     fast_oop_rawmem = initialize_object(alloc,
1379                                         fast_oop_ctrl, fast_oop_rawmem, fast_oop,
1380                                         klass_node, length, size_in_bytes);
1381 
1382     // If initialization is performed by an array copy, any required
1383     // MemBarStoreStore was already added. If the object does not
1384     // escape no need for a MemBarStoreStore. Otherwise we need a
1385     // MemBarStoreStore so that stores that initialize this object
1386     // can't be reordered with a subsequent store that makes this
1387     // object accessible by other threads.

1388     if (init == NULL || (!init->is_complete_with_arraycopy() && !init->does_not_escape())) {




1389       if (init == NULL || init->req() < InitializeNode::RawStores) {
1390         // No InitializeNode or no stores captured by zeroing
1391         // elimination. Simply add the MemBarStoreStore after object
1392         // initialization.
1393         MemBarNode* mb = MemBarNode::make(C, Op_MemBarStoreStore, Compile::AliasIdxBot);
1394         transform_later(mb);
1395 
1396         mb->init_req(TypeFunc::Memory, fast_oop_rawmem);
1397         mb->init_req(TypeFunc::Control, fast_oop_ctrl);
1398         fast_oop_ctrl = new (C) ProjNode(mb,TypeFunc::Control);
1399         transform_later(fast_oop_ctrl);
1400         fast_oop_rawmem = new (C) ProjNode(mb,TypeFunc::Memory);
1401         transform_later(fast_oop_rawmem);
1402       } else {
1403         // Add the MemBarStoreStore after the InitializeNode so that
1404         // all stores performing the initialization that were moved
1405         // before the InitializeNode happen before the storestore
1406         // barrier.
1407 
1408         Node* init_ctrl = init->proj_out(TypeFunc::Control);




1368       Node* alloc_size = new (C) ConvI2LNode(size_in_bytes);
1369       transform_later(alloc_size);
1370 #endif
1371       Node* new_alloc_bytes = new (C) AddLNode(alloc_bytes, alloc_size);
1372       transform_later(new_alloc_bytes);
1373       fast_oop_rawmem = make_store(fast_oop_ctrl, store_eden_top, alloc_bytes_adr,
1374                                    0, new_alloc_bytes, T_LONG);
1375     }
1376 
1377     InitializeNode* init = alloc->initialization();
1378     fast_oop_rawmem = initialize_object(alloc,
1379                                         fast_oop_ctrl, fast_oop_rawmem, fast_oop,
1380                                         klass_node, length, size_in_bytes);
1381 
1382     // If initialization is performed by an array copy, any required
1383     // MemBarStoreStore was already added. If the object does not
1384     // escape no need for a MemBarStoreStore. Otherwise we need a
1385     // MemBarStoreStore so that stores that initialize this object
1386     // can't be reordered with a subsequent store that makes this
1387     // object accessible by other threads.
1388 #ifndef AARCH64
1389     if (init == NULL || (!init->is_complete_with_arraycopy() && !init->does_not_escape())) {
1390 #else
1391     if (!alloc->does_not_escape_thread() &&
1392         (init == NULL || !init->is_complete_with_arraycopy())) {
1393 #endif
1394       if (init == NULL || init->req() < InitializeNode::RawStores) {
1395         // No InitializeNode or no stores captured by zeroing
1396         // elimination. Simply add the MemBarStoreStore after object
1397         // initialization.
1398         MemBarNode* mb = MemBarNode::make(C, Op_MemBarStoreStore, Compile::AliasIdxBot);
1399         transform_later(mb);
1400 
1401         mb->init_req(TypeFunc::Memory, fast_oop_rawmem);
1402         mb->init_req(TypeFunc::Control, fast_oop_ctrl);
1403         fast_oop_ctrl = new (C) ProjNode(mb,TypeFunc::Control);
1404         transform_later(fast_oop_ctrl);
1405         fast_oop_rawmem = new (C) ProjNode(mb,TypeFunc::Memory);
1406         transform_later(fast_oop_rawmem);
1407       } else {
1408         // Add the MemBarStoreStore after the InitializeNode so that
1409         // all stores performing the initialization that were moved
1410         // before the InitializeNode happen before the storestore
1411         // barrier.
1412 
1413         Node* init_ctrl = init->proj_out(TypeFunc::Control);


< prev index next >