Mercurial > hg > truffle
comparison src/share/vm/opto/c2compiler.cpp @ 10278:6f3fd5150b67
6934604: enable parts of EliminateAutoBox by default
Summary: Resurrected autobox elimination code and enabled part of it by default.
Reviewed-by: roland, twisti
author | kvn |
---|---|
date | Wed, 08 May 2013 15:08:01 -0700 |
parents | 1d1603768966 |
children | 469216acdb28 d2907f74462e |
comparison
equal
deleted
inserted
replaced
10277:aabf54ccedb1 | 10278:6f3fd5150b67 |
---|---|
123 initialize(); | 123 initialize(); |
124 } | 124 } |
125 bool subsume_loads = SubsumeLoads; | 125 bool subsume_loads = SubsumeLoads; |
126 bool do_escape_analysis = DoEscapeAnalysis && | 126 bool do_escape_analysis = DoEscapeAnalysis && |
127 !env->jvmti_can_access_local_variables(); | 127 !env->jvmti_can_access_local_variables(); |
128 bool eliminate_boxing = EliminateAutoBox; | |
128 while (!env->failing()) { | 129 while (!env->failing()) { |
129 // Attempt to compile while subsuming loads into machine instructions. | 130 // Attempt to compile while subsuming loads into machine instructions. |
130 Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis); | 131 Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis, eliminate_boxing); |
131 | 132 |
132 | 133 |
133 // Check result and retry if appropriate. | 134 // Check result and retry if appropriate. |
134 if (C.failure_reason() != NULL) { | 135 if (C.failure_reason() != NULL) { |
135 if (C.failure_reason_is(retry_no_subsuming_loads())) { | 136 if (C.failure_reason_is(retry_no_subsuming_loads())) { |
138 continue; // retry | 139 continue; // retry |
139 } | 140 } |
140 if (C.failure_reason_is(retry_no_escape_analysis())) { | 141 if (C.failure_reason_is(retry_no_escape_analysis())) { |
141 assert(do_escape_analysis, "must make progress"); | 142 assert(do_escape_analysis, "must make progress"); |
142 do_escape_analysis = false; | 143 do_escape_analysis = false; |
144 continue; // retry | |
145 } | |
146 if (C.has_boxed_value()) { | |
147 // Recompile without boxing elimination regardless failure reason. | |
148 assert(eliminate_boxing, "must make progress"); | |
149 eliminate_boxing = false; | |
143 continue; // retry | 150 continue; // retry |
144 } | 151 } |
145 // Pass any other failure reason up to the ciEnv. | 152 // Pass any other failure reason up to the ciEnv. |
146 // Note that serious, irreversible failures are already logged | 153 // Note that serious, irreversible failures are already logged |
147 // on the ciEnv via env->record_method_not_compilable(). | 154 // on the ciEnv via env->record_method_not_compilable(). |