< prev index next >

src/share/vm/opto/compile.cpp

Print this page
rev 8713 : SIMD: CMoveVD - .ad is "almost" good. need to make CC in codegen taken rightly from IdealGraph.
Also added (Windows only) an option to stop in debugger after compiled file has been printed.
See compile.cpp: WINDOWS_ONLY(if(method()->has_option("BreakAfterCompilation")) DebugBreak();)
rev 8715 : Making breakpoint after compilation system independent.
rev 8877 : tests from repo commit
rev 8930 : SIMD: cleanup - trailing spaces, tabs
rev 9042 : SIMD: added global flag UseCMov (false).
rev 9043 : SIMD: UseCMov is a must and not set alone in do_vector_loop()
rev 9045 : SIMD: fixed if (!def->is_Bool() || def->in(0) != NULL || def->outcnt() != 1) return NULL;,
      Removed if(method()->has_option("BreakAfterCompilation")) os::breakpoint();
rev 9101 : Merge
rev 9150 : SIMD: fixing trace/debug printiout
rev 9161 : Merge


1084   set_has_stringbuilder(false);
1085   set_has_boxed_value(false);
1086   _trap_can_recompile = false;  // no traps emitted yet
1087   _major_progress = true; // start out assuming good things will happen
1088   set_has_unsafe_access(false);
1089   set_max_vector_size(0);
1090   Copy::zero_to_bytes(_trap_hist, sizeof(_trap_hist));
1091   set_decompile_count(0);
1092 
1093   set_do_freq_based_layout(BlockLayoutByFrequency || method_has_option("BlockLayoutByFrequency"));
1094   set_num_loop_opts(LoopOptsCount);
1095   set_do_inlining(Inline);
1096   set_max_inline_size(MaxInlineSize);
1097   set_freq_inline_size(FreqInlineSize);
1098   set_do_scheduling(OptoScheduling);
1099   set_do_count_invocations(false);
1100   set_do_method_data_update(false);
1101 
1102   set_do_vector_loop(false);
1103 
1104   bool do_vector = false;
1105   if (AllowVectorizeOnDemand) {
1106     if (has_method() && (method()->has_option("Vectorize") || method()->has_option("VectorizeDebug"))) {
1107       set_do_vector_loop(true);

1108     } else if (has_method() && method()->name() != 0 &&
1109                method()->intrinsic_id() == vmIntrinsics::_forEachRemaining) {
1110       set_do_vector_loop(true);
1111     }
1112 #ifndef PRODUCT
1113     if (do_vector_loop() && Verbose) {
1114       tty->print("Compile::Init: do vectorized loops (SIMD like) for method %s\n",  method()->name()->as_quoted_ascii());
1115     }
1116 #endif
1117   }


1118 
1119   set_age_code(has_method() && method()->profile_aging());
1120   set_rtm_state(NoRTM); // No RTM lock eliding by default
1121   method_has_option_value("MaxNodeLimit", _max_node_limit);
1122 #if INCLUDE_RTM_OPT
1123   if (UseRTMLocking && has_method() && (method()->method_data_or_null() != NULL)) {
1124     int rtm_state = method()->method_data()->rtm_state();
1125     if (method_has_option("NoRTMLockEliding") || ((rtm_state & NoRTM) != 0)) {
1126       // Don't generate RTM lock eliding code.
1127       set_rtm_state(NoRTM);
1128     } else if (method_has_option("UseRTMLockEliding") || ((rtm_state & UseRTM) != 0) || !UseRTMDeopt) {
1129       // Generate RTM lock eliding code without abort ratio calculation code.
1130       set_rtm_state(UseRTM);
1131     } else if (UseRTMDeopt) {
1132       // Generate RTM lock eliding code and include abort ratio calculation
1133       // code if UseRTMDeopt is on.
1134       set_rtm_state(ProfileRTM);
1135     }
1136   }
1137 #endif




1084   set_has_stringbuilder(false);
1085   set_has_boxed_value(false);
1086   _trap_can_recompile = false;  // no traps emitted yet
1087   _major_progress = true; // start out assuming good things will happen
1088   set_has_unsafe_access(false);
1089   set_max_vector_size(0);
1090   Copy::zero_to_bytes(_trap_hist, sizeof(_trap_hist));
1091   set_decompile_count(0);
1092 
1093   set_do_freq_based_layout(BlockLayoutByFrequency || method_has_option("BlockLayoutByFrequency"));
1094   set_num_loop_opts(LoopOptsCount);
1095   set_do_inlining(Inline);
1096   set_max_inline_size(MaxInlineSize);
1097   set_freq_inline_size(FreqInlineSize);
1098   set_do_scheduling(OptoScheduling);
1099   set_do_count_invocations(false);
1100   set_do_method_data_update(false);
1101 
1102   set_do_vector_loop(false);
1103 

1104   if (AllowVectorizeOnDemand) {
1105     if (has_method() && (method()->has_option("Vectorize") || method()->has_option("VectorizeDebug"))) {
1106       set_do_vector_loop(true);
1107       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());})
1108     } else if (has_method() && method()->name() != 0 &&
1109                method()->intrinsic_id() == vmIntrinsics::_forEachRemaining) {
1110       set_do_vector_loop(true);
1111     }





1112   }
1113   set_use_cmove(UseCMov /* || do_vector_loop()*/); //TODO: consider do_vector_loop() mandate use_cmove unconditionally
1114   NOT_PRODUCT(if (Verbose && has_method()) {tty->print("Compile::Init: use CMove without profitability tests for method %s\n",  method()->name()->as_quoted_ascii());})
1115 
1116   set_age_code(has_method() && method()->profile_aging());
1117   set_rtm_state(NoRTM); // No RTM lock eliding by default
1118   method_has_option_value("MaxNodeLimit", _max_node_limit);
1119 #if INCLUDE_RTM_OPT
1120   if (UseRTMLocking && has_method() && (method()->method_data_or_null() != NULL)) {
1121     int rtm_state = method()->method_data()->rtm_state();
1122     if (method_has_option("NoRTMLockEliding") || ((rtm_state & NoRTM) != 0)) {
1123       // Don't generate RTM lock eliding code.
1124       set_rtm_state(NoRTM);
1125     } else if (method_has_option("UseRTMLockEliding") || ((rtm_state & UseRTM) != 0) || !UseRTMDeopt) {
1126       // Generate RTM lock eliding code without abort ratio calculation code.
1127       set_rtm_state(UseRTM);
1128     } else if (UseRTMDeopt) {
1129       // Generate RTM lock eliding code and include abort ratio calculation
1130       // code if UseRTMDeopt is on.
1131       set_rtm_state(ProfileRTM);
1132     }
1133   }
1134 #endif


< prev index next >