src/share/vm/opto/compile.cpp

Print this page
rev 3898 : 8005031: Some cleanup in c2 to prepare for incremental inlining support
Summary: collection of small changes to prepare for incremental inlining.
Reviewed-by:

*** 608,618 **** _dead_node_count(0), #ifndef PRODUCT _trace_opto_output(TraceOptoOutput || method()->has_option("TraceOptoOutput")), _printer(IdealGraphPrinter::printer()), #endif ! _congraph(NULL) { C = this; CompileWrapper cw(this); #ifndef PRODUCT if (TimeCompiler2) { --- 608,620 ---- _dead_node_count(0), #ifndef PRODUCT _trace_opto_output(TraceOptoOutput || method()->has_option("TraceOptoOutput")), _printer(IdealGraphPrinter::printer()), #endif ! _congraph(NULL), ! _print_inlining_list(NULL), ! _print_inlining(0) { C = this; CompileWrapper cw(this); #ifndef PRODUCT if (TimeCompiler2) {
*** 664,673 **** --- 666,678 ---- uint estimated_size = method()->code_size()*4+64; estimated_size = (estimated_size < MINIMUM_NODE_HASH ? MINIMUM_NODE_HASH : estimated_size); PhaseGVN gvn(node_arena(), estimated_size); set_initial_gvn(&gvn); + if (PrintInlining) { + _print_inlining_list = new (comp_arena())GrowableArray<PrintInliningEvent>(comp_arena(), 1, 1, PrintInliningEvent()); + } { // Scope for timing the parser TracePhase t3("parse", &_t_parser, true); // Put top into the hash table ASAP. initial_gvn()->transform_no_reclaim(top());
*** 752,761 **** --- 757,767 ---- cg->do_late_inline(); if (failing()) return; } } assert(_late_inlines.length() == 0, "should have been processed"); + dump_inlining(); print_method("Before RemoveUseless", 3); // Remove clutter produced by parsing. if (!failing()) {
*** 897,907 **** _trace_opto_output(TraceOptoOutput), _printer(NULL), #endif _dead_node_list(comp_arena()), _dead_node_count(0), ! _congraph(NULL) { C = this; #ifndef PRODUCT TraceTime t1(NULL, &_t_totalCompilation, TimeCompiler, false); TraceTime t2(NULL, &_t_stubCompilation, TimeCompiler, false); --- 903,915 ---- _trace_opto_output(TraceOptoOutput), _printer(NULL), #endif _dead_node_list(comp_arena()), _dead_node_count(0), ! _congraph(NULL), ! _print_inlining_list(NULL), ! _print_inlining(0) { C = this; #ifndef PRODUCT TraceTime t1(NULL, &_t_totalCompilation, TimeCompiler, false); TraceTime t2(NULL, &_t_stubCompilation, TimeCompiler, false);
*** 3349,3353 **** --- 3357,3369 ---- assert(*constant_addr == (((address) n) + i), err_msg_res("all jump-table entries must contain adjusted node pointer: " INTPTR_FORMAT " == " INTPTR_FORMAT, *constant_addr, (((address) n) + i))); *constant_addr = cb.consts()->target(*labels.at(i), (address) constant_addr); 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()); + } + } + }