Path: blob/master/src/hotspot/share/opto/c2compiler.hpp
40930 views
/*1* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_OPTO_C2COMPILER_HPP25#define SHARE_OPTO_C2COMPILER_HPP2627#include "compiler/abstractCompiler.hpp"28#include "opto/output.hpp"2930class C2Compiler : public AbstractCompiler {31private:32static bool init_c2_runtime();3334public:35C2Compiler() : AbstractCompiler(compiler_c2) {}3637// Name38const char *name() { return "C2"; }39void initialize();4041// Compilation entry point for methods42void compile_method(ciEnv* env,43ciMethod* target,44int entry_bci,45bool install_code,46DirectiveSet* directive);4748// sentinel value used to trigger backtracking in compile_method().49static const char* retry_no_subsuming_loads();50static const char* retry_no_escape_analysis();51static const char* retry_class_loading_during_parsing();5253// Print compilation timers and statistics54void print_timers();5556// Return true if the intrinsification of a method supported by the compiler57// assuming a non-virtual dispatch. (A virtual dispatch is58// possible for only a limited set of available intrinsics whereas59// a non-virtual dispatch is possible for all available intrinsics.)60// Return false otherwise.61virtual bool is_intrinsic_supported(const methodHandle& method) {62return is_intrinsic_supported(method, false);63}6465// Check if the compiler supports an intrinsic for 'method' given the66// the dispatch mode specified by the 'is_virtual' parameter.67bool is_intrinsic_supported(const methodHandle& method, bool is_virtual);6869// Initial size of the code buffer (may be increased at runtime)70static int initial_code_buffer_size(int const_size = initial_const_capacity);71};7273#endif // SHARE_OPTO_C2COMPILER_HPP747576