c1_Compiler.hpp revision 1472
0N/A/*
1472N/A * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
0N/A// There is one instance of the Compiler per CompilerThread.
0N/A
0N/Aclass Compiler: public AbstractCompiler {
0N/A
0N/A private:
0N/A
0N/A // Tracks whether runtime has been initialized
0N/A static volatile int _runtimes;
0N/A
0N/A // In tiered it is possible for multiple threads to want to do compilation
0N/A // only one can enter c1 at a time
0N/A static volatile bool _compiling;
0N/A
0N/A public:
0N/A // Creation
0N/A Compiler();
0N/A ~Compiler();
0N/A
0N/A // Name of this compiler
0N/A virtual const char* name() { return "C1"; }
0N/A
0N/A#ifdef TIERED
0N/A virtual bool is_c1() { return true; };
0N/A#endif // TIERED
0N/A
0N/A
0N/A // Missing feature tests
0N/A virtual bool supports_native() { return true; }
0N/A virtual bool supports_osr () { return true; }
0N/A
0N/A // Customization
0N/A virtual bool needs_adapters () { return false; }
0N/A virtual bool needs_stubs () { return false; }
0N/A
0N/A // Initialization
0N/A virtual void initialize();
0N/A
0N/A // Compilation entry point for methods
0N/A virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci);
0N/A
0N/A // Print compilation timers and statistics
0N/A virtual void print_timers();
0N/A};