Mercurial > hg > truffle
comparison src/share/vm/opto/block.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 | 1bd45abaa507 |
children | b9a9ed0f8eeb |
comparison
equal
deleted
inserted
replaced
6803:06f52c4d0e18 | 6804:e626685e9f6c |
---|---|
376 { | 376 { |
377 ResourceMark rm; | 377 ResourceMark rm; |
378 // I'll need a few machine-specific GotoNodes. Make an Ideal GotoNode, | 378 // I'll need a few machine-specific GotoNodes. Make an Ideal GotoNode, |
379 // then Match it into a machine-specific Node. Then clone the machine | 379 // then Match it into a machine-specific Node. Then clone the machine |
380 // Node on demand. | 380 // Node on demand. |
381 Node *x = new (C, 1) GotoNode(NULL); | 381 Node *x = new (C) GotoNode(NULL); |
382 x->init_req(0, x); | 382 x->init_req(0, x); |
383 _goto = m.match_tree(x); | 383 _goto = m.match_tree(x); |
384 assert(_goto != NULL, ""); | 384 assert(_goto != NULL, ""); |
385 _goto->set_req(0,_goto); | 385 _goto->set_req(0,_goto); |
386 | 386 |
430 p = p->in(0); // Move control forward | 430 p = p->in(0); // Move control forward |
431 } while( !p->is_block_proj() && | 431 } while( !p->is_block_proj() && |
432 !p->is_block_start() ); | 432 !p->is_block_start() ); |
433 // Make the block begin with one of Region or StartNode. | 433 // Make the block begin with one of Region or StartNode. |
434 if( !p->is_block_start() ) { | 434 if( !p->is_block_start() ) { |
435 RegionNode *r = new (C, 2) RegionNode( 2 ); | 435 RegionNode *r = new (C) RegionNode( 2 ); |
436 r->init_req(1, p); // Insert RegionNode in the way | 436 r->init_req(1, p); // Insert RegionNode in the way |
437 proj->set_req(0, r); // Insert RegionNode in the way | 437 proj->set_req(0, r); // Insert RegionNode in the way |
438 p = r; | 438 p = r; |
439 } | 439 } |
440 // 'p' now points to the start of this basic block | 440 // 'p' now points to the start of this basic block |
506 // surrounding blocks. | 506 // surrounding blocks. |
507 float freq = in->_freq * in->succ_prob(succ_no); | 507 float freq = in->_freq * in->succ_prob(succ_no); |
508 // get ProjNode corresponding to the succ_no'th successor of the in block | 508 // get ProjNode corresponding to the succ_no'th successor of the in block |
509 ProjNode* proj = in->_nodes[in->_nodes.size() - in->_num_succs + succ_no]->as_Proj(); | 509 ProjNode* proj = in->_nodes[in->_nodes.size() - in->_num_succs + succ_no]->as_Proj(); |
510 // create region for basic block | 510 // create region for basic block |
511 RegionNode* region = new (C, 2) RegionNode(2); | 511 RegionNode* region = new (C) RegionNode(2); |
512 region->init_req(1, proj); | 512 region->init_req(1, proj); |
513 // setup corresponding basic block | 513 // setup corresponding basic block |
514 Block* block = new (_bbs._arena) Block(_bbs._arena, region); | 514 Block* block = new (_bbs._arena) Block(_bbs._arena, region); |
515 _bbs.map(region->_idx, block); | 515 _bbs.map(region->_idx, block); |
516 C->regalloc()->set_bad(region->_idx); | 516 C->regalloc()->set_bad(region->_idx); |