< prev index next >

src/hotspot/share/opto/compile.cpp

Print this page




 931 #endif
 932     TracePhase tp("install_code", &timers[_t_registerMethod]);
 933 
 934     if (is_osr_compilation()) {
 935       _code_offsets.set_value(CodeOffsets::Verified_Entry, 0);
 936       _code_offsets.set_value(CodeOffsets::OSR_Entry, _first_block_size);
 937     } else {
 938       _code_offsets.set_value(CodeOffsets::Verified_Entry, _first_block_size);
 939       _code_offsets.set_value(CodeOffsets::OSR_Entry, 0);
 940     }
 941 
 942     env()->register_method(_method, _entry_bci,
 943                            &_code_offsets,
 944                            _orig_pc_slot_offset_in_bytes,
 945                            code_buffer(),
 946                            frame_size_in_words(), _oop_map_set,
 947                            &_handler_table, &_inc_table,
 948                            compiler,
 949                            has_unsafe_access(),
 950                            SharedRuntime::is_wide_vector(max_vector_size()),


 951                            rtm_state()
 952                            );
 953 
 954     if (log() != NULL) // Print code cache state into compiler log
 955       log()->code_cache_state();
 956   }
 957 }
 958 
 959 //------------------------------Compile----------------------------------------
 960 // Compile a runtime stub
 961 Compile::Compile( ciEnv* ci_env,
 962                   TypeFunc_generator generator,
 963                   address stub_function,
 964                   const char *stub_name,
 965                   int is_fancy_jump,
 966                   bool pass_tls,
 967                   bool save_arg_registers,
 968                   bool return_pc,
 969                   DirectiveSet* directive)
 970   : Phase(Compiler),


1121   set_has_stringbuilder(false);
1122   set_has_boxed_value(false);
1123   _trap_can_recompile = false;  // no traps emitted yet
1124   _major_progress = true; // start out assuming good things will happen
1125   set_has_unsafe_access(false);
1126   set_max_vector_size(0);
1127   set_clear_upper_avx(false);  //false as default for clear upper bits of ymm registers
1128   Copy::zero_to_bytes(_trap_hist, sizeof(_trap_hist));
1129   set_decompile_count(0);
1130 
1131   set_do_freq_based_layout(_directive->BlockLayoutByFrequencyOption);
1132   _loop_opts_cnt = LoopOptsCount;
1133   set_do_inlining(Inline);
1134   set_max_inline_size(MaxInlineSize);
1135   set_freq_inline_size(FreqInlineSize);
1136   set_do_scheduling(OptoScheduling);
1137   set_do_count_invocations(false);
1138   set_do_method_data_update(false);
1139 
1140   set_do_vector_loop(false);

1141 
1142   if (AllowVectorizeOnDemand) {
1143     if (has_method() && (_directive->VectorizeOption || _directive->VectorizeDebugOption)) {
1144       set_do_vector_loop(true);
1145       NOT_PRODUCT(if (do_vector_loop() && Verbose) {tty->print("Compile::Init: do vectorized loops (SIMD like) for method %s\n",  method()->name()->as_quoted_ascii());})
1146     } else if (has_method() && method()->name() != 0 &&
1147                method()->intrinsic_id() == vmIntrinsics::_forEachRemaining) {
1148       set_do_vector_loop(true);
1149     }
1150   }
1151   set_use_cmove(UseCMoveUnconditionally /* || do_vector_loop()*/); //TODO: consider do_vector_loop() mandate use_cmove unconditionally
1152   NOT_PRODUCT(if (use_cmove() && Verbose && has_method()) {tty->print("Compile::Init: use CMove without profitability tests for method %s\n",  method()->name()->as_quoted_ascii());})
1153 
1154   set_age_code(has_method() && method()->profile_aging());
1155   set_rtm_state(NoRTM); // No RTM lock eliding by default
1156   _max_node_limit = _directive->MaxNodeLimitOption;
1157 
1158 #if INCLUDE_RTM_OPT
1159   if (UseRTMLocking && has_method() && (method()->method_data_or_null() != NULL)) {
1160     int rtm_state = method()->method_data()->rtm_state();




 931 #endif
 932     TracePhase tp("install_code", &timers[_t_registerMethod]);
 933 
 934     if (is_osr_compilation()) {
 935       _code_offsets.set_value(CodeOffsets::Verified_Entry, 0);
 936       _code_offsets.set_value(CodeOffsets::OSR_Entry, _first_block_size);
 937     } else {
 938       _code_offsets.set_value(CodeOffsets::Verified_Entry, _first_block_size);
 939       _code_offsets.set_value(CodeOffsets::OSR_Entry, 0);
 940     }
 941 
 942     env()->register_method(_method, _entry_bci,
 943                            &_code_offsets,
 944                            _orig_pc_slot_offset_in_bytes,
 945                            code_buffer(),
 946                            frame_size_in_words(), _oop_map_set,
 947                            &_handler_table, &_inc_table,
 948                            compiler,
 949                            has_unsafe_access(),
 950                            SharedRuntime::is_wide_vector(max_vector_size()),
 951                            has_monitors(),
 952                            0,
 953                            rtm_state()
 954                            );
 955 
 956     if (log() != NULL) // Print code cache state into compiler log
 957       log()->code_cache_state();
 958   }
 959 }
 960 
 961 //------------------------------Compile----------------------------------------
 962 // Compile a runtime stub
 963 Compile::Compile( ciEnv* ci_env,
 964                   TypeFunc_generator generator,
 965                   address stub_function,
 966                   const char *stub_name,
 967                   int is_fancy_jump,
 968                   bool pass_tls,
 969                   bool save_arg_registers,
 970                   bool return_pc,
 971                   DirectiveSet* directive)
 972   : Phase(Compiler),


1123   set_has_stringbuilder(false);
1124   set_has_boxed_value(false);
1125   _trap_can_recompile = false;  // no traps emitted yet
1126   _major_progress = true; // start out assuming good things will happen
1127   set_has_unsafe_access(false);
1128   set_max_vector_size(0);
1129   set_clear_upper_avx(false);  //false as default for clear upper bits of ymm registers
1130   Copy::zero_to_bytes(_trap_hist, sizeof(_trap_hist));
1131   set_decompile_count(0);
1132 
1133   set_do_freq_based_layout(_directive->BlockLayoutByFrequencyOption);
1134   _loop_opts_cnt = LoopOptsCount;
1135   set_do_inlining(Inline);
1136   set_max_inline_size(MaxInlineSize);
1137   set_freq_inline_size(FreqInlineSize);
1138   set_do_scheduling(OptoScheduling);
1139   set_do_count_invocations(false);
1140   set_do_method_data_update(false);
1141 
1142   set_do_vector_loop(false);
1143   set_has_monitors(false);
1144 
1145   if (AllowVectorizeOnDemand) {
1146     if (has_method() && (_directive->VectorizeOption || _directive->VectorizeDebugOption)) {
1147       set_do_vector_loop(true);
1148       NOT_PRODUCT(if (do_vector_loop() && Verbose) {tty->print("Compile::Init: do vectorized loops (SIMD like) for method %s\n",  method()->name()->as_quoted_ascii());})
1149     } else if (has_method() && method()->name() != 0 &&
1150                method()->intrinsic_id() == vmIntrinsics::_forEachRemaining) {
1151       set_do_vector_loop(true);
1152     }
1153   }
1154   set_use_cmove(UseCMoveUnconditionally /* || do_vector_loop()*/); //TODO: consider do_vector_loop() mandate use_cmove unconditionally
1155   NOT_PRODUCT(if (use_cmove() && Verbose && has_method()) {tty->print("Compile::Init: use CMove without profitability tests for method %s\n",  method()->name()->as_quoted_ascii());})
1156 
1157   set_age_code(has_method() && method()->profile_aging());
1158   set_rtm_state(NoRTM); // No RTM lock eliding by default
1159   _max_node_limit = _directive->MaxNodeLimitOption;
1160 
1161 #if INCLUDE_RTM_OPT
1162   if (UseRTMLocking && has_method() && (method()->method_data_or_null() != NULL)) {
1163     int rtm_state = method()->method_data()->rtm_state();


< prev index next >