src/share/vm/opto/c2compiler.cpp

changeset 2040
0e35fa8ebccd
parent 1907
c18cbe5936b8
child 2314
f95d63e2154a
equal deleted inserted replaced
2039:66c5dadb4d61 2040:0e35fa8ebccd
101 ciMethod* target, 101 ciMethod* target,
102 int entry_bci) { 102 int entry_bci) {
103 if (!is_initialized()) { 103 if (!is_initialized()) {
104 initialize(); 104 initialize();
105 } 105 }
106 bool subsume_loads = true; 106 bool subsume_loads = SubsumeLoads;
107 bool do_escape_analysis = DoEscapeAnalysis && 107 bool do_escape_analysis = DoEscapeAnalysis &&
108 !env->jvmti_can_access_local_variables(); 108 !env->jvmti_can_access_local_variables();
109 while (!env->failing()) { 109 while (!env->failing()) {
110 // Attempt to compile while subsuming loads into machine instructions. 110 // Attempt to compile while subsuming loads into machine instructions.
111 Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis); 111 Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis);
112
112 113
113 // Check result and retry if appropriate. 114 // Check result and retry if appropriate.
114 if (C.failure_reason() != NULL) { 115 if (C.failure_reason() != NULL) {
115 if (C.failure_reason_is(retry_no_subsuming_loads())) { 116 if (C.failure_reason_is(retry_no_subsuming_loads())) {
116 assert(subsume_loads, "must make progress"); 117 assert(subsume_loads, "must make progress");
125 // Pass any other failure reason up to the ciEnv. 126 // Pass any other failure reason up to the ciEnv.
126 // Note that serious, irreversible failures are already logged 127 // Note that serious, irreversible failures are already logged
127 // on the ciEnv via env->record_method_not_compilable(). 128 // on the ciEnv via env->record_method_not_compilable().
128 env->record_failure(C.failure_reason()); 129 env->record_failure(C.failure_reason());
129 } 130 }
131 if (StressRecompilation) {
132 if (subsume_loads) {
133 subsume_loads = false;
134 continue; // retry
135 }
136 if (do_escape_analysis) {
137 do_escape_analysis = false;
138 continue; // retry
139 }
140 }
130 141
131 // No retry; just break the loop. 142 // No retry; just break the loop.
132 break; 143 break;
133 } 144 }
134 } 145 }

mercurial