Mercurial > hg > truffle
comparison src/share/vm/opto/compile.cpp @ 1634:60a14ad85270
6966411: escape.cpp:450 assert(base->Opcode() == Op_ConP
Summary: Execute IGVN optimization before and after Escape Analysis
Reviewed-by: never
author | kvn |
---|---|
date | Fri, 02 Jul 2010 17:30:30 -0700 |
parents | 4311f23817fd |
children | 0e35fa8ebccd |
comparison
equal
deleted
inserted
replaced
1633:65b0c03b165d | 1634:60a14ad85270 |
---|---|
635 #endif | 635 #endif |
636 | 636 |
637 if (failing()) return; | 637 if (failing()) return; |
638 NOT_PRODUCT( verify_graph_edges(); ) | 638 NOT_PRODUCT( verify_graph_edges(); ) |
639 | 639 |
640 // Perform escape analysis | |
641 if (_do_escape_analysis && ConnectionGraph::has_candidates(this)) { | |
642 TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, true); | |
643 // Add ConP#NULL and ConN#NULL nodes before ConnectionGraph construction. | |
644 PhaseGVN* igvn = initial_gvn(); | |
645 Node* oop_null = igvn->zerocon(T_OBJECT); | |
646 Node* noop_null = igvn->zerocon(T_NARROWOOP); | |
647 | |
648 _congraph = new(comp_arena()) ConnectionGraph(this); | |
649 bool has_non_escaping_obj = _congraph->compute_escape(); | |
650 | |
651 #ifndef PRODUCT | |
652 if (PrintEscapeAnalysis) { | |
653 _congraph->dump(); | |
654 } | |
655 #endif | |
656 // Cleanup. | |
657 if (oop_null->outcnt() == 0) | |
658 igvn->hash_delete(oop_null); | |
659 if (noop_null->outcnt() == 0) | |
660 igvn->hash_delete(noop_null); | |
661 | |
662 if (!has_non_escaping_obj) { | |
663 _congraph = NULL; | |
664 } | |
665 | |
666 if (failing()) return; | |
667 } | |
668 // Now optimize | 640 // Now optimize |
669 Optimize(); | 641 Optimize(); |
670 if (failing()) return; | 642 if (failing()) return; |
671 NOT_PRODUCT( verify_graph_edges(); ) | 643 NOT_PRODUCT( verify_graph_edges(); ) |
672 | 644 |
1598 } | 1570 } |
1599 | 1571 |
1600 print_method("Iter GVN 1", 2); | 1572 print_method("Iter GVN 1", 2); |
1601 | 1573 |
1602 if (failing()) return; | 1574 if (failing()) return; |
1575 | |
1576 // Perform escape analysis | |
1577 if (_do_escape_analysis && ConnectionGraph::has_candidates(this)) { | |
1578 TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, true); | |
1579 ConnectionGraph::do_analysis(this, &igvn); | |
1580 | |
1581 if (failing()) return; | |
1582 | |
1583 igvn.optimize(); | |
1584 print_method("Iter GVN 3", 2); | |
1585 | |
1586 if (failing()) return; | |
1587 | |
1588 } | |
1603 | 1589 |
1604 // Loop transforms on the ideal graph. Range Check Elimination, | 1590 // Loop transforms on the ideal graph. Range Check Elimination, |
1605 // peeling, unrolling, etc. | 1591 // peeling, unrolling, etc. |
1606 | 1592 |
1607 // Set loop opts counter | 1593 // Set loop opts counter |