src/share/vm/shark/sharkCompiler.cpp

Print this page


   1 /*
   2  * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2008, 2009, 2010 Red Hat, Inc.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "incls/_precompiled.incl"
  27 #include "incls/_sharkCompiler.cpp.incl"


















  28 
  29 #include <fnmatch.h>
  30 
  31 using namespace llvm;
  32 
  33 #if SHARK_LLVM_VERSION >= 27
  34 namespace {
  35   cl::opt<std::string>
  36   MCPU("mcpu");
  37 
  38   cl::list<std::string>
  39   MAttrs("mattr",
  40          cl::CommaSeparated);
  41 }
  42 #endif
  43 
  44 SharkCompiler::SharkCompiler()
  45   : AbstractCompiler() {
  46   // Create the lock to protect the memory manager and execution engine
  47   _execution_engine_lock = new Monitor(Mutex::leaf, "SharkExecutionEngineLock");


   1 /*
   2  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2008, 2009, 2010 Red Hat, Inc.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "ci/ciEnv.hpp"
  28 #include "ci/ciMethod.hpp"
  29 #include "code/debugInfoRec.hpp"
  30 #include "code/dependencies.hpp"
  31 #include "code/exceptionHandlerTable.hpp"
  32 #include "code/oopRecorder.hpp"
  33 #include "compiler/abstractCompiler.hpp"
  34 #include "compiler/oopMap.hpp"
  35 #include "shark/llvmHeaders.hpp"
  36 #include "shark/sharkBuilder.hpp"
  37 #include "shark/sharkCodeBuffer.hpp"
  38 #include "shark/sharkCompiler.hpp"
  39 #include "shark/sharkContext.hpp"
  40 #include "shark/sharkEntry.hpp"
  41 #include "shark/sharkFunction.hpp"
  42 #include "shark/sharkMemoryManager.hpp"
  43 #include "shark/sharkNativeWrapper.hpp"
  44 #include "shark/shark_globals.hpp"
  45 #include "utilities/debug.hpp"
  46 
  47 #include <fnmatch.h>
  48 
  49 using namespace llvm;
  50 
  51 #if SHARK_LLVM_VERSION >= 27
  52 namespace {
  53   cl::opt<std::string>
  54   MCPU("mcpu");
  55 
  56   cl::list<std::string>
  57   MAttrs("mattr",
  58          cl::CommaSeparated);
  59 }
  60 #endif
  61 
  62 SharkCompiler::SharkCompiler()
  63   : AbstractCompiler() {
  64   // Create the lock to protect the memory manager and execution engine
  65   _execution_engine_lock = new Monitor(Mutex::leaf, "SharkExecutionEngineLock");