405 buf.stubs()->initialize_shared_locs(&locs_buf[lsize], lsize); |
405 buf.stubs()->initialize_shared_locs(&locs_buf[lsize], lsize); |
406 n->emit(buf, this->regalloc()); |
406 n->emit(buf, this->regalloc()); |
407 return buf.code_size(); |
407 return buf.code_size(); |
408 } |
408 } |
409 |
409 |
410 void Compile::record_for_escape_analysis(Node* n) { |
|
411 if (_congraph != NULL) |
|
412 _congraph->record_for_escape_analysis(n); |
|
413 } |
|
414 |
|
415 |
410 |
416 // ============================================================================ |
411 // ============================================================================ |
417 //------------------------------Compile standard------------------------------- |
412 //------------------------------Compile standard------------------------------- |
418 debug_only( int Compile::_debug_idx = 100000; ) |
413 debug_only( int Compile::_debug_idx = 100000; ) |
419 |
414 |
492 uint estimated_size = method()->code_size()*4+64; |
487 uint estimated_size = method()->code_size()*4+64; |
493 estimated_size = (estimated_size < MINIMUM_NODE_HASH ? MINIMUM_NODE_HASH : estimated_size); |
488 estimated_size = (estimated_size < MINIMUM_NODE_HASH ? MINIMUM_NODE_HASH : estimated_size); |
494 PhaseGVN gvn(node_arena(), estimated_size); |
489 PhaseGVN gvn(node_arena(), estimated_size); |
495 set_initial_gvn(&gvn); |
490 set_initial_gvn(&gvn); |
496 |
491 |
497 if (_do_escape_analysis) |
|
498 _congraph = new ConnectionGraph(this); |
|
499 |
|
500 { // Scope for timing the parser |
492 { // Scope for timing the parser |
501 TracePhase t3("parse", &_t_parser, true); |
493 TracePhase t3("parse", &_t_parser, true); |
502 |
494 |
503 // Put top into the hash table ASAP. |
495 // Put top into the hash table ASAP. |
504 initial_gvn()->transform_no_reclaim(top()); |
496 initial_gvn()->transform_no_reclaim(top()); |
579 |
571 |
580 if (failing()) return; |
572 if (failing()) return; |
581 NOT_PRODUCT( verify_graph_edges(); ) |
573 NOT_PRODUCT( verify_graph_edges(); ) |
582 |
574 |
583 // Perform escape analysis |
575 // Perform escape analysis |
|
576 if (_do_escape_analysis) |
|
577 _congraph = new ConnectionGraph(this); |
584 if (_congraph != NULL) { |
578 if (_congraph != NULL) { |
585 NOT_PRODUCT( TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, TimeCompiler); ) |
579 NOT_PRODUCT( TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, TimeCompiler); ) |
586 _congraph->compute_escape(); |
580 _congraph->compute_escape(); |
587 if (failing()) return; |
581 if (failing()) return; |
588 |
582 |