comparison src/share/vm/opto/phaseX.cpp @ 6804:e626685e9f6c

7193318: C2: remove number of inputs requirement from Node's new operator Summary: Deleted placement new operator of Node - node(size_t, Compile *, int). Reviewed-by: kvn, twisti Contributed-by: bharadwaj.yadavalli@oracle.com
author kvn
date Thu, 27 Sep 2012 09:38:42 -0700
parents 611e8a669a2c
children b9a9ed0f8eeb
comparison
equal deleted inserted replaced
6803:06f52c4d0e18 6804:e626685e9f6c
46 _inserts(0), _insert_limit( insert_limit() ), 46 _inserts(0), _insert_limit( insert_limit() ),
47 _look_probes(0), _lookup_hits(0), _lookup_misses(0), 47 _look_probes(0), _lookup_hits(0), _lookup_misses(0),
48 _total_insert_probes(0), _total_inserts(0), 48 _total_insert_probes(0), _total_inserts(0),
49 _insert_probes(0), _grows(0) { 49 _insert_probes(0), _grows(0) {
50 // _sentinel must be in the current node space 50 // _sentinel must be in the current node space
51 _sentinel = new (Compile::current(), 1) ProjNode(NULL, TypeFunc::Control); 51 _sentinel = new (Compile::current()) ProjNode(NULL, TypeFunc::Control);
52 memset(_table,0,sizeof(Node*)*_max); 52 memset(_table,0,sizeof(Node*)*_max);
53 } 53 }
54 54
55 //------------------------------NodeHash--------------------------------------- 55 //------------------------------NodeHash---------------------------------------
56 NodeHash::NodeHash(Arena *arena, uint est_max_size) : 56 NodeHash::NodeHash(Arena *arena, uint est_max_size) :
61 _look_probes(0), _lookup_hits(0), _lookup_misses(0), 61 _look_probes(0), _lookup_hits(0), _lookup_misses(0),
62 _delete_probes(0), _delete_hits(0), _delete_misses(0), 62 _delete_probes(0), _delete_hits(0), _delete_misses(0),
63 _total_insert_probes(0), _total_inserts(0), 63 _total_insert_probes(0), _total_inserts(0),
64 _insert_probes(0), _grows(0) { 64 _insert_probes(0), _grows(0) {
65 // _sentinel must be in the current node space 65 // _sentinel must be in the current node space
66 _sentinel = new (Compile::current(), 1) ProjNode(NULL, TypeFunc::Control); 66 _sentinel = new (Compile::current()) ProjNode(NULL, TypeFunc::Control);
67 memset(_table,0,sizeof(Node*)*_max); 67 memset(_table,0,sizeof(Node*)*_max);
68 } 68 }
69 69
70 //------------------------------NodeHash--------------------------------------- 70 //------------------------------NodeHash---------------------------------------
71 NodeHash::NodeHash(NodeHash *nh) { 71 NodeHash::NodeHash(NodeHash *nh) {
1244 } 1244 }
1245 i -= num_edges; // we deleted 1 or more copies of this edge 1245 i -= num_edges; // we deleted 1 or more copies of this edge
1246 } 1246 }
1247 1247
1248 // Smash all inputs to 'old', isolating him completely 1248 // Smash all inputs to 'old', isolating him completely
1249 Node *temp = new (C, 1) Node(1); 1249 Node *temp = new (C) Node(1);
1250 temp->init_req(0,nn); // Add a use to nn to prevent him from dying 1250 temp->init_req(0,nn); // Add a use to nn to prevent him from dying
1251 remove_dead_node( old ); 1251 remove_dead_node( old );
1252 temp->del_req(0); // Yank bogus edge 1252 temp->del_req(0); // Yank bogus edge
1253 #ifndef PRODUCT 1253 #ifndef PRODUCT
1254 if( VerifyIterativeGVN ) { 1254 if( VerifyIterativeGVN ) {