src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/opto/compile.cpp

src/share/vm/opto/compile.cpp

Print this page
rev 9030 : 8137167: JEP165: Compiler Control: Implementation task
Summary:
Reviewed-by:
rev 9031 : [mq]: test

*** 462,472 **** compile->set_indexSet_free_block_list(NULL); compile->init_type_arena(); Type::Initialize(compile); _compile->set_scratch_buffer_blob(NULL); _compile->begin_method(); ! _compile->clone_map().set_debug(_compile->has_method() && _compile->method_has_option(_compile->clone_map().debug_option_name)); } CompileWrapper::~CompileWrapper() { _compile->end_method(); if (_compile->scratch_buffer_blob() != NULL) BufferBlob::free(_compile->scratch_buffer_blob()); --- 462,472 ---- compile->set_indexSet_free_block_list(NULL); compile->init_type_arena(); Type::Initialize(compile); _compile->set_scratch_buffer_blob(NULL); _compile->begin_method(); ! _compile->clone_map().set_debug(_compile->has_method() && _compile->directive()->CloneMapDebugOption); } CompileWrapper::~CompileWrapper() { _compile->end_method(); if (_compile->scratch_buffer_blob() != NULL) BufferBlob::free(_compile->scratch_buffer_blob());
*** 494,504 **** // Recompiling without boxing elimination tty->print_cr("*********************************************************"); tty->print_cr("** Bailout: Recompile without boxing elimination **"); tty->print_cr("*********************************************************"); } ! if (env()->break_at_compile()) { // Open the debugger when compiling this method. tty->print("### Breaking when compiling: "); method()->print_short_name(); tty->cr(); BREAKPOINT; --- 494,504 ---- // Recompiling without boxing elimination tty->print_cr("*********************************************************"); tty->print_cr("** Bailout: Recompile without boxing elimination **"); tty->print_cr("*********************************************************"); } ! if (C->directive()->BreakAtCompileOption) { // Open the debugger when compiling this method. tty->print("### Breaking when compiling: "); method()->print_short_name(); tty->cr(); BREAKPOINT;
*** 615,627 **** // Compile a method. entry_bci is -1 for normal compilations and indicates // the continuation bci for on stack replacement. Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr_bci, ! bool subsume_loads, bool do_escape_analysis, bool eliminate_boxing ) : Phase(Compiler), _env(ci_env), _log(ci_env->log()), _compile_id(ci_env->compile_id()), _save_argument_registers(false), _stub_name(NULL), _stub_function(NULL), --- 615,628 ---- // Compile a method. entry_bci is -1 for normal compilations and indicates // the continuation bci for on stack replacement. Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr_bci, ! bool subsume_loads, bool do_escape_analysis, bool eliminate_boxing, DirectiveSet* directive) : Phase(Compiler), _env(ci_env), + _directive(directive), _log(ci_env->log()), _compile_id(ci_env->compile_id()), _save_argument_registers(false), _stub_name(NULL), _stub_function(NULL),
*** 647,657 **** _scratch_const_size(-1), _in_scratch_emit_size(false), _dead_node_list(comp_arena()), _dead_node_count(0), #ifndef PRODUCT ! _trace_opto_output(TraceOptoOutput || method()->has_option("TraceOptoOutput")), _in_dump_cnt(0), _printer(IdealGraphPrinter::printer()), #endif _congraph(NULL), _comp_arena(mtCompiler), --- 648,658 ---- _scratch_const_size(-1), _in_scratch_emit_size(false), _dead_node_list(comp_arena()), _dead_node_count(0), #ifndef PRODUCT ! _trace_opto_output(directive->TraceOptoOutputOption), _in_dump_cnt(0), _printer(IdealGraphPrinter::printer()), #endif _congraph(NULL), _comp_arena(mtCompiler),
*** 685,711 **** } TraceTime t1("Total compilation time", &_t_totalCompilation, CITime, CITimeVerbose); TraceTime t2(NULL, &_t_methodCompilation, CITime, false); #ifndef PRODUCT ! bool print_opto_assembly = PrintOptoAssembly || _method->has_option("PrintOptoAssembly"); if (!print_opto_assembly) { ! bool print_assembly = (PrintAssembly || _method->should_print_assembly()); if (print_assembly && !Disassembler::can_decode()) { tty->print_cr("PrintAssembly request changed to PrintOptoAssembly"); print_opto_assembly = true; } } set_print_assembly(print_opto_assembly); set_parsed_irreducible_loop(false); ! if (method()->has_option("ReplayInline")) { _replay_inline_data = ciReplay::load_inline_data(method(), entry_bci(), ci_env->comp_level()); } #endif ! set_print_inlining(PrintInlining || method()->has_option("PrintInlining") NOT_PRODUCT( || PrintOptoInlining)); ! set_print_intrinsics(PrintIntrinsics || method()->has_option("PrintIntrinsics")); set_has_irreducible_loop(true); // conservative until build_loop_tree() reset it if (ProfileTraps RTM_OPT_ONLY( || UseRTMLocking )) { // Make sure the method being compiled gets its own MDO, // so we can at least track the decompile_count(). --- 686,712 ---- } TraceTime t1("Total compilation time", &_t_totalCompilation, CITime, CITimeVerbose); TraceTime t2(NULL, &_t_methodCompilation, CITime, false); #ifndef PRODUCT ! bool print_opto_assembly = directive->PrintOptoAssemblyOption; if (!print_opto_assembly) { ! bool print_assembly = directive->PrintAssemblyOption; if (print_assembly && !Disassembler::can_decode()) { tty->print_cr("PrintAssembly request changed to PrintOptoAssembly"); print_opto_assembly = true; } } set_print_assembly(print_opto_assembly); set_parsed_irreducible_loop(false); ! if (directive->ReplayInlineOption) { _replay_inline_data = ciReplay::load_inline_data(method(), entry_bci(), ci_env->comp_level()); } #endif ! set_print_inlining(directive->PrintInliningOption NOT_PRODUCT( || PrintOptoInlining)); ! set_print_intrinsics(directive->PrintIntrinsicsOption); set_has_irreducible_loop(true); // conservative until build_loop_tree() reset it if (ProfileTraps RTM_OPT_ONLY( || UseRTMLocking )) { // Make sure the method being compiled gets its own MDO, // so we can at least track the decompile_count().
*** 835,845 **** } // Drain the list. Finish_Warm(); #ifndef PRODUCT ! if (_printer && _printer->should_print(_method)) { _printer->print_inlining(this); } #endif if (failing()) return; --- 836,846 ---- } // Drain the list. Finish_Warm(); #ifndef PRODUCT ! if (_printer && _printer->should_print(1)) { _printer->print_inlining(this); } #endif if (failing()) return;
*** 869,882 **** #endif NOT_PRODUCT( verify_barriers(); ) // Dump compilation data to replay it. ! if (method()->has_option("DumpReplay")) { env()->dump_replay_data(_compile_id); } ! if (method()->has_option("DumpInline") && (ilt() != NULL)) { env()->dump_inline_data(_compile_id); } // Now that we know the size of all the monitors we can add a fixed slot // for the original deopt pc. --- 870,883 ---- #endif NOT_PRODUCT( verify_barriers(); ) // Dump compilation data to replay it. ! if (directive->DumpReplayOption) { env()->dump_replay_data(_compile_id); } ! if (directive->DumpInlineOption && (ilt() != NULL)) { env()->dump_inline_data(_compile_id); } // Now that we know the size of all the monitors we can add a fixed slot // for the original deopt pc.
*** 916,928 **** _orig_pc_slot_offset_in_bytes, code_buffer(), frame_size_in_words(), _oop_map_set, &_handler_table, &_inc_table, compiler, - env()->comp_level(), has_unsafe_access(), SharedRuntime::is_wide_vector(max_vector_size()), rtm_state() ); if (log() != NULL) // Print code cache state into compiler log log()->code_cache_state(); --- 917,929 ---- _orig_pc_slot_offset_in_bytes, code_buffer(), frame_size_in_words(), _oop_map_set, &_handler_table, &_inc_table, compiler, has_unsafe_access(), SharedRuntime::is_wide_vector(max_vector_size()), + _directive, rtm_state() ); if (log() != NULL) // Print code cache state into compiler log log()->code_cache_state();
*** 936,948 **** address stub_function, const char *stub_name, int is_fancy_jump, bool pass_tls, bool save_arg_registers, ! bool return_pc ) : Phase(Compiler), _env(ci_env), _log(ci_env->log()), _compile_id(0), _save_argument_registers(save_arg_registers), _method(NULL), _stub_name(stub_name), --- 937,951 ---- address stub_function, const char *stub_name, int is_fancy_jump, bool pass_tls, bool save_arg_registers, ! bool return_pc, ! DirectiveSet* directive) : Phase(Compiler), _env(ci_env), + _directive(directive), _log(ci_env->log()), _compile_id(0), _save_argument_registers(save_arg_registers), _method(NULL), _stub_name(stub_name),
*** 1088,1098 **** set_has_unsafe_access(false); set_max_vector_size(0); Copy::zero_to_bytes(_trap_hist, sizeof(_trap_hist)); set_decompile_count(0); ! set_do_freq_based_layout(BlockLayoutByFrequency || method_has_option("BlockLayoutByFrequency")); set_num_loop_opts(LoopOptsCount); set_do_inlining(Inline); set_max_inline_size(MaxInlineSize); set_freq_inline_size(FreqInlineSize); set_do_scheduling(OptoScheduling); --- 1091,1101 ---- set_has_unsafe_access(false); set_max_vector_size(0); Copy::zero_to_bytes(_trap_hist, sizeof(_trap_hist)); set_decompile_count(0); ! set_do_freq_based_layout(_directive->BlockLayoutByFrequencyOption); set_num_loop_opts(LoopOptsCount); set_do_inlining(Inline); set_max_inline_size(MaxInlineSize); set_freq_inline_size(FreqInlineSize); set_do_scheduling(OptoScheduling);
*** 1101,1111 **** set_do_vector_loop(false); bool do_vector = false; if (AllowVectorizeOnDemand) { ! if (has_method() && (method()->has_option("Vectorize") || method()->has_option("VectorizeDebug"))) { set_do_vector_loop(true); } else if (has_method() && method()->name() != 0 && method()->intrinsic_id() == vmIntrinsics::_forEachRemaining) { set_do_vector_loop(true); } --- 1104,1114 ---- set_do_vector_loop(false); bool do_vector = false; if (AllowVectorizeOnDemand) { ! if (has_method() && (_directive->VectorizeOption || _directive->VectorizeDebugOption)) { set_do_vector_loop(true); } else if (has_method() && method()->name() != 0 && method()->intrinsic_id() == vmIntrinsics::_forEachRemaining) { set_do_vector_loop(true); }
*** 1116,1126 **** #endif } set_age_code(has_method() && method()->profile_aging()); set_rtm_state(NoRTM); // No RTM lock eliding by default ! method_has_option_value("MaxNodeLimit", _max_node_limit); #if INCLUDE_RTM_OPT if (UseRTMLocking && has_method() && (method()->method_data_or_null() != NULL)) { int rtm_state = method()->method_data()->rtm_state(); if (method_has_option("NoRTMLockEliding") || ((rtm_state & NoRTM) != 0)) { // Don't generate RTM lock eliding code. --- 1119,1130 ---- #endif } set_age_code(has_method() && method()->profile_aging()); set_rtm_state(NoRTM); // No RTM lock eliding by default ! _max_node_limit = _directive->MaxNodeLimitOption; ! #if INCLUDE_RTM_OPT if (UseRTMLocking && has_method() && (method()->method_data_or_null() != NULL)) { int rtm_state = method()->method_data()->rtm_state(); if (method_has_option("NoRTMLockEliding") || ((rtm_state & NoRTM) != 0)) { // Don't generate RTM lock eliding code.
*** 2089,2099 **** // Given a graph, optimize it. void Compile::Optimize() { TracePhase tp("optimizer", &timers[_t_optimizer]); #ifndef PRODUCT ! if (env()->break_at_compile()) { BREAKPOINT; } #endif --- 2093,2103 ---- // Given a graph, optimize it. void Compile::Optimize() { TracePhase tp("optimizer", &timers[_t_optimizer]); #ifndef PRODUCT ! if (_directive->BreakAtCompileOption) { BREAKPOINT; } #endif
*** 4353,4363 **** bool Compile::randomized_select(int count) { assert(count > 0, "only positive"); return (os::random() & RANDOMIZED_DOMAIN_MASK) < (RANDOMIZED_DOMAIN / count); } - const char* CloneMap::debug_option_name = "CloneMapDebug"; CloneMap& Compile::clone_map() { return _clone_map; } void Compile::set_clone_map(Dict* d) { _clone_map._dict = d; } void NodeCloneInfo::dump() const { tty->print(" {%d:%d} ", idx(), gen()); --- 4357,4366 ----
src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File