< prev index next >

src/hotspot/share/c1/c1_Compilation.hpp

Print this page

 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_C1_C1_COMPILATION_HPP
 26 #define SHARE_C1_C1_COMPILATION_HPP
 27 
 28 #include "ci/ciEnv.hpp"
 29 #include "ci/ciMethodData.hpp"
 30 #include "code/exceptionHandlerTable.hpp"
 31 #include "compiler/compiler_globals.hpp"
 32 #include "compiler/compilerDefinitions.inline.hpp"
 33 #include "compiler/compilerDirectives.hpp"
 34 #include "runtime/deoptimization.hpp"

 35 
 36 class CompilationFailureInfo;
 37 class CompilationResourceObj;
 38 class XHandlers;
 39 class ExceptionInfo;
 40 class DebugInformationRecorder;
 41 class FrameMap;
 42 class IR;
 43 class IRScope;
 44 class Instruction;
 45 class LinearScan;
 46 class OopMap;
 47 class LIR_Emitter;
 48 class LIR_Assembler;
 49 class CodeEmitInfo;
 50 class ciEnv;
 51 class ciMethod;
 52 class ValueStack;
 53 class C1_MacroAssembler;
 54 class CFGPrinter;

235   }
236   bool profile_inlined_calls() {
237     return profile_calls() && C1ProfileInlinedCalls;
238   }
239   bool profile_checkcasts() {
240     return env()->comp_level() == CompLevel_full_profile &&
241       C1UpdateMethodData && C1ProfileCheckcasts;
242   }
243   bool profile_parameters() {
244     return env()->comp_level() == CompLevel_full_profile &&
245       C1UpdateMethodData && MethodData::profile_parameters();
246   }
247   bool profile_arguments() {
248     return env()->comp_level() == CompLevel_full_profile &&
249       C1UpdateMethodData && MethodData::profile_arguments();
250   }
251   bool profile_return() {
252     return env()->comp_level() == CompLevel_full_profile &&
253       C1UpdateMethodData && MethodData::profile_return();
254   }




255 
256   // will compilation make optimistic assumptions that might lead to
257   // deoptimization and that the runtime will account for?
258   bool is_optimistic() {
259     return CompilerConfig::is_c1_only_no_jvmci() && !is_profiling() &&
260       (RangeCheckElimination || UseLoopInvariantCodeMotion) &&
261       method()->method_data()->trap_count(Deoptimization::Reason_none) == 0;
262   }
263 
264   ciKlass* cha_exact_type(ciType* type);
265 
266   // Dump inlining replay data to the stream.
267   void dump_inline_data(outputStream* out) { /* do nothing now */ }
268 
269   // How much stack space would the interpreter need in case of a
270   // deoptimization (worst case)
271   void update_interpreter_frame_size(int size) {
272     if (_interpreter_frame_size < size) {
273       _interpreter_frame_size = size;
274     }

 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_C1_C1_COMPILATION_HPP
 26 #define SHARE_C1_C1_COMPILATION_HPP
 27 
 28 #include "ci/ciEnv.hpp"
 29 #include "ci/ciMethodData.hpp"
 30 #include "code/exceptionHandlerTable.hpp"
 31 #include "compiler/compiler_globals.hpp"
 32 #include "compiler/compilerDefinitions.inline.hpp"
 33 #include "compiler/compilerDirectives.hpp"
 34 #include "runtime/deoptimization.hpp"
 35 #include "runtime/sharedRuntime.hpp"
 36 
 37 class CompilationFailureInfo;
 38 class CompilationResourceObj;
 39 class XHandlers;
 40 class ExceptionInfo;
 41 class DebugInformationRecorder;
 42 class FrameMap;
 43 class IR;
 44 class IRScope;
 45 class Instruction;
 46 class LinearScan;
 47 class OopMap;
 48 class LIR_Emitter;
 49 class LIR_Assembler;
 50 class CodeEmitInfo;
 51 class ciEnv;
 52 class ciMethod;
 53 class ValueStack;
 54 class C1_MacroAssembler;
 55 class CFGPrinter;

236   }
237   bool profile_inlined_calls() {
238     return profile_calls() && C1ProfileInlinedCalls;
239   }
240   bool profile_checkcasts() {
241     return env()->comp_level() == CompLevel_full_profile &&
242       C1UpdateMethodData && C1ProfileCheckcasts;
243   }
244   bool profile_parameters() {
245     return env()->comp_level() == CompLevel_full_profile &&
246       C1UpdateMethodData && MethodData::profile_parameters();
247   }
248   bool profile_arguments() {
249     return env()->comp_level() == CompLevel_full_profile &&
250       C1UpdateMethodData && MethodData::profile_arguments();
251   }
252   bool profile_return() {
253     return env()->comp_level() == CompLevel_full_profile &&
254       C1UpdateMethodData && MethodData::profile_return();
255   }
256   bool profile_array_accesses() {
257     return env()->comp_level() == CompLevel_full_profile &&
258       C1UpdateMethodData;
259   }
260 
261   // will compilation make optimistic assumptions that might lead to
262   // deoptimization and that the runtime will account for?
263   bool is_optimistic() {
264     return CompilerConfig::is_c1_only_no_jvmci() && !is_profiling() &&
265       (RangeCheckElimination || UseLoopInvariantCodeMotion) &&
266       method()->method_data()->trap_count(Deoptimization::Reason_none) == 0;
267   }
268 
269   ciKlass* cha_exact_type(ciType* type);
270 
271   // Dump inlining replay data to the stream.
272   void dump_inline_data(outputStream* out) { /* do nothing now */ }
273 
274   // How much stack space would the interpreter need in case of a
275   // deoptimization (worst case)
276   void update_interpreter_frame_size(int size) {
277     if (_interpreter_frame_size < size) {
278       _interpreter_frame_size = size;
279     }
< prev index next >