phaseX.cpp (10762:ea81fe138932) | phaseX.cpp (11894:2629b100a7e3) |
---|---|
1/* 2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * --- 477 unchanged lines hidden (view full) --- 486 487 // Storage for the updated type information. 488 Type_Array new_type_array(C->comp_arena()); 489 490 // Iterate over the set of live nodes. 491 uint current_idx = 0; // The current new node ID. Incremented after every assignment. 492 for (uint i = 0; i < _useful.size(); i++) { 493 Node* n = _useful.at(i); | 1/* 2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * --- 477 unchanged lines hidden (view full) --- 486 487 // Storage for the updated type information. 488 Type_Array new_type_array(C->comp_arena()); 489 490 // Iterate over the set of live nodes. 491 uint current_idx = 0; // The current new node ID. Incremented after every assignment. 492 for (uint i = 0; i < _useful.size(); i++) { 493 Node* n = _useful.at(i); |
494 // Sanity check that fails if we ever decide to execute this phase after EA 495 assert(!n->is_Phi() || n->as_Phi()->inst_mem_id() == -1, "should not be linked to data Phi"); |
|
494 const Type* type = gvn->type_or_null(n); 495 new_type_array.map(current_idx, type); 496 497 bool in_worklist = false; 498 if (worklist->member(n)) { 499 in_worklist = true; 500 } 501 --- 941 unchanged lines hidden (view full) --- 1443 if (use->in(j) == old) { 1444 use->set_req(j, nn); 1445 ++num_edges; 1446 } 1447 } 1448 i -= num_edges; // we deleted 1 or more copies of this edge 1449 } 1450 | 496 const Type* type = gvn->type_or_null(n); 497 new_type_array.map(current_idx, type); 498 499 bool in_worklist = false; 500 if (worklist->member(n)) { 501 in_worklist = true; 502 } 503 --- 941 unchanged lines hidden (view full) --- 1445 if (use->in(j) == old) { 1446 use->set_req(j, nn); 1447 ++num_edges; 1448 } 1449 } 1450 i -= num_edges; // we deleted 1 or more copies of this edge 1451 } 1452 |
1453 // Search for instance field data PhiNodes in the same region pointing to the old 1454 // memory PhiNode and update their instance memory ids to point to the new node. 1455 if (old->is_Phi() && old->as_Phi()->type()->has_memory() && old->in(0) != NULL) { 1456 Node* region = old->in(0); 1457 for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) { 1458 PhiNode* phi = region->fast_out(i)->isa_Phi(); 1459 if (phi != NULL && phi->inst_mem_id() == (int)old->_idx) { 1460 phi->set_inst_mem_id((int)nn->_idx); 1461 } 1462 } 1463 } 1464 |
|
1451 // Smash all inputs to 'old', isolating him completely 1452 Node *temp = new Node(1); 1453 temp->init_req(0,nn); // Add a use to nn to prevent him from dying 1454 remove_dead_node( old ); 1455 temp->del_req(0); // Yank bogus edge 1456#ifndef PRODUCT 1457 if( VerifyIterativeGVN ) { 1458 for ( int i = 0; i < _verify_window_size; i++ ) { --- 596 unchanged lines hidden --- | 1465 // Smash all inputs to 'old', isolating him completely 1466 Node *temp = new Node(1); 1467 temp->init_req(0,nn); // Add a use to nn to prevent him from dying 1468 remove_dead_node( old ); 1469 temp->del_req(0); // Yank bogus edge 1470#ifndef PRODUCT 1471 if( VerifyIterativeGVN ) { 1472 for ( int i = 0; i < _verify_window_size; i++ ) { --- 596 unchanged lines hidden --- |