1375 InitializeNode* init = use->as_Allocate()->initialization();
1376 if (init != NULL) {
1377 Node* imem = init->proj_out(TypeFunc::Memory);
1378 if (imem != NULL) add_users_to_worklist0(imem);
1379 }
1380 }
1381 if (use_op == Op_Initialize) {
1382 Node* imem = use->as_Initialize()->proj_out(TypeFunc::Memory);
1383 if (imem != NULL) add_users_to_worklist0(imem);
1384 }
1385 }
1386 }
1387
1388 /**
1389 * Remove the speculative part of all types that we know of
1390 */
1391 void PhaseIterGVN::remove_speculative_types() {
1392 assert(UseTypeSpeculation, "speculation is off");
1393 for (uint i = 0; i < _types.Size(); i++) {
1394 const Type* t = _types.fast_lookup(i);
1395 if (t != NULL && t->isa_oopptr()) {
1396 const TypeOopPtr* to = t->is_oopptr();
1397 _types.map(i, to->remove_speculative());
1398 }
1399 }
1400 }
1401
1402 //=============================================================================
1403 #ifndef PRODUCT
1404 uint PhaseCCP::_total_invokes = 0;
1405 uint PhaseCCP::_total_constants = 0;
1406 #endif
1407 //------------------------------PhaseCCP---------------------------------------
1408 // Conditional Constant Propagation, ala Wegman & Zadeck
1409 PhaseCCP::PhaseCCP( PhaseIterGVN *igvn ) : PhaseIterGVN(igvn) {
1410 NOT_PRODUCT( clear_constants(); )
1411 assert( _worklist.size() == 0, "" );
1412 // Clear out _nodes from IterGVN. Must be clear to transform call.
1413 _nodes.clear(); // Clear out from IterGVN
1414 analyze();
1415 }
1416
1417 #ifndef PRODUCT
|
1375 InitializeNode* init = use->as_Allocate()->initialization();
1376 if (init != NULL) {
1377 Node* imem = init->proj_out(TypeFunc::Memory);
1378 if (imem != NULL) add_users_to_worklist0(imem);
1379 }
1380 }
1381 if (use_op == Op_Initialize) {
1382 Node* imem = use->as_Initialize()->proj_out(TypeFunc::Memory);
1383 if (imem != NULL) add_users_to_worklist0(imem);
1384 }
1385 }
1386 }
1387
1388 /**
1389 * Remove the speculative part of all types that we know of
1390 */
1391 void PhaseIterGVN::remove_speculative_types() {
1392 assert(UseTypeSpeculation, "speculation is off");
1393 for (uint i = 0; i < _types.Size(); i++) {
1394 const Type* t = _types.fast_lookup(i);
1395 if (t != NULL) {
1396 _types.map(i, t->remove_speculative());
1397 }
1398 }
1399 }
1400
1401 //=============================================================================
1402 #ifndef PRODUCT
1403 uint PhaseCCP::_total_invokes = 0;
1404 uint PhaseCCP::_total_constants = 0;
1405 #endif
1406 //------------------------------PhaseCCP---------------------------------------
1407 // Conditional Constant Propagation, ala Wegman & Zadeck
1408 PhaseCCP::PhaseCCP( PhaseIterGVN *igvn ) : PhaseIterGVN(igvn) {
1409 NOT_PRODUCT( clear_constants(); )
1410 assert( _worklist.size() == 0, "" );
1411 // Clear out _nodes from IterGVN. Must be clear to transform call.
1412 _nodes.clear(); // Clear out from IterGVN
1413 analyze();
1414 }
1415
1416 #ifndef PRODUCT
|