Mercurial > hg > graal-compiler
diff src/share/vm/opto/compile.cpp @ 7421:ad5dd04754ee
8005031: Some cleanup in c2 to prepare for incremental inlining support
Summary: collection of small changes to prepare for incremental inlining.
Reviewed-by: twisti, kvn
author | roland |
---|---|
date | Tue, 18 Dec 2012 14:55:25 +0100 |
parents | cd3d6a6b95d9 |
children | d092d1b31229 |
line wrap: on
line diff
--- a/src/share/vm/opto/compile.cpp Mon Dec 17 11:00:22 2012 -0800 +++ b/src/share/vm/opto/compile.cpp Tue Dec 18 14:55:25 2012 +0100 @@ -610,7 +610,9 @@ _trace_opto_output(TraceOptoOutput || method()->has_option("TraceOptoOutput")), _printer(IdealGraphPrinter::printer()), #endif - _congraph(NULL) { + _congraph(NULL), + _print_inlining_list(NULL), + _print_inlining(0) { C = this; CompileWrapper cw(this); @@ -666,6 +668,9 @@ PhaseGVN gvn(node_arena(), estimated_size); set_initial_gvn(&gvn); + if (PrintInlining) { + _print_inlining_list = new (comp_arena())GrowableArray<PrintInliningBuffer>(comp_arena(), 1, 1, PrintInliningBuffer()); + } { // Scope for timing the parser TracePhase t3("parse", &_t_parser, true); @@ -754,6 +759,7 @@ } } assert(_late_inlines.length() == 0, "should have been processed"); + dump_inlining(); print_method("Before RemoveUseless", 3); @@ -899,7 +905,9 @@ #endif _dead_node_list(comp_arena()), _dead_node_count(0), - _congraph(NULL) { + _congraph(NULL), + _print_inlining_list(NULL), + _print_inlining(0) { C = this; #ifndef PRODUCT @@ -3351,3 +3359,11 @@ cb.consts()->relocate((address) constant_addr, relocInfo::internal_word_type); } } + +void Compile::dump_inlining() { + if (PrintInlining) { + for (int i = 0; i < _print_inlining_list->length(); i++) { + tty->print(_print_inlining_list->at(i).ss()->as_string()); + } + } +}