Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include "compiler_llvm.h" |
| 18 | |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 19 | #include "class_linker.h" |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 20 | #include "compilation_unit.h" |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 21 | #include "compiler.h" |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 22 | #include "dex_cache.h" |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 23 | #include "ir_builder.h" |
Logan Chien | 88894ee | 2012-02-13 16:42:22 +0800 | [diff] [blame] | 24 | #include "jni_compiler.h" |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 25 | #include "method_compiler.h" |
Logan Chien | 4dd96f5 | 2012-02-29 01:26:58 +0800 | [diff] [blame] | 26 | #include "oat_compilation_unit.h" |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 27 | #include "stl_util.h" |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 28 | #include "upcall_compiler.h" |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 29 | |
Logan Chien | dd7cf5b | 2012-03-01 12:55:19 +0800 | [diff] [blame] | 30 | #include <llvm/LinkAllPasses.h> |
| 31 | #include <llvm/LinkAllVMCore.h> |
Logan Chien | 4c17dff | 2012-03-02 20:15:46 +0800 | [diff] [blame] | 32 | #include <llvm/Support/CommandLine.h> |
Logan Chien | 013b6f2 | 2012-03-02 17:20:33 +0800 | [diff] [blame] | 33 | #include <llvm/Support/ManagedStatic.h> |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 34 | #include <llvm/Support/TargetSelect.h> |
| 35 | #include <llvm/Support/Threading.h> |
| 36 | |
Logan Chien | 013b6f2 | 2012-03-02 17:20:33 +0800 | [diff] [blame] | 37 | namespace llvm { |
| 38 | extern bool TimePassesIsEnabled; |
| 39 | } |
| 40 | |
Logan Chien | 4c17dff | 2012-03-02 20:15:46 +0800 | [diff] [blame] | 41 | extern llvm::cl::opt<bool> EnableARMLongCalls; |
| 42 | // NOTE: Although EnableARMLongCalls is defined in llvm/lib/Target/ARM/ |
| 43 | // ARMISelLowering.cpp, however, it is not in the llvm namespace. |
| 44 | |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 45 | |
Shih-wei Liao | fc34adb | 2012-03-07 08:51:44 -0800 | [diff] [blame] | 46 | namespace { |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 47 | |
Shih-wei Liao | fc34adb | 2012-03-07 08:51:44 -0800 | [diff] [blame] | 48 | pthread_once_t llvm_initialized = PTHREAD_ONCE_INIT; |
| 49 | |
| 50 | void InitializeLLVM() { |
Logan Chien | 013b6f2 | 2012-03-02 17:20:33 +0800 | [diff] [blame] | 51 | // NOTE: Uncomment following line to show the time consumption of LLVM passes |
| 52 | //llvm::TimePassesIsEnabled = true; |
| 53 | |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 54 | // Initialize LLVM target, MC subsystem, asm printer, and asm parser |
| 55 | llvm::InitializeAllTargets(); |
| 56 | llvm::InitializeAllTargetMCs(); |
| 57 | llvm::InitializeAllAsmPrinters(); |
| 58 | llvm::InitializeAllAsmParsers(); |
| 59 | // TODO: Maybe we don't have to initialize "all" targets. |
| 60 | |
Logan Chien | 4c17dff | 2012-03-02 20:15:46 +0800 | [diff] [blame] | 61 | // Enable -arm-long-calls |
| 62 | EnableARMLongCalls = true; |
| 63 | |
Logan Chien | dd7cf5b | 2012-03-01 12:55:19 +0800 | [diff] [blame] | 64 | // Initialize LLVM optimization passes |
| 65 | llvm::PassRegistry ®istry = *llvm::PassRegistry::getPassRegistry(); |
| 66 | |
| 67 | llvm::initializeCore(registry); |
| 68 | llvm::initializeScalarOpts(registry); |
| 69 | llvm::initializeIPO(registry); |
| 70 | llvm::initializeAnalysis(registry); |
| 71 | llvm::initializeIPA(registry); |
| 72 | llvm::initializeTransformUtils(registry); |
| 73 | llvm::initializeInstCombine(registry); |
| 74 | llvm::initializeInstrumentation(registry); |
| 75 | llvm::initializeTarget(registry); |
| 76 | |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 77 | // Initialize LLVM internal data structure for multithreading |
| 78 | llvm::llvm_start_multithreaded(); |
| 79 | } |
| 80 | |
Logan Chien | f130655 | 2012-03-16 11:17:53 +0800 | [diff] [blame] | 81 | // The Guard to Shutdown LLVM |
Logan Chien | aeb5303 | 2012-03-18 02:29:38 +0800 | [diff] [blame^] | 82 | // llvm::llvm_shutdown_obj llvm_guard; |
| 83 | // TODO: We are commenting out this line because this will cause SEGV from |
| 84 | // time to time. |
| 85 | // Two reasons: (1) the order of the destruction of static objects, or |
| 86 | // (2) dlopen/dlclose side-effect on static objects. |
Shih-wei Liao | fc34adb | 2012-03-07 08:51:44 -0800 | [diff] [blame] | 87 | |
| 88 | } // anonymous namespace |
| 89 | |
| 90 | |
| 91 | namespace art { |
| 92 | namespace compiler_llvm { |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 93 | |
| 94 | |
Logan Chien | e75a8cc | 2012-02-24 12:26:43 +0800 | [diff] [blame] | 95 | llvm::Module* makeLLVMModuleContents(llvm::Module* module); |
Logan Chien | 42e0e15 | 2012-01-13 15:42:36 +0800 | [diff] [blame] | 96 | |
| 97 | |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 98 | CompilerLLVM::CompilerLLVM(Compiler* compiler, InstructionSet insn_set) |
Shih-wei Liao | 5b8b1ed | 2012-02-23 23:48:21 -0800 | [diff] [blame] | 99 | : compiler_(compiler), compiler_lock_("llvm_compiler_lock"), |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 100 | insn_set_(insn_set), curr_cunit_(NULL) { |
Shih-wei Liao | fc34adb | 2012-03-07 08:51:44 -0800 | [diff] [blame] | 101 | |
| 102 | |
| 103 | // Initialize LLVM libraries |
| 104 | pthread_once(&llvm_initialized, InitializeLLVM); |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | |
| 108 | CompilerLLVM::~CompilerLLVM() { |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 109 | STLDeleteElements(&cunits_); |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | |
Logan Chien | ce11906 | 2012-03-02 11:57:34 +0800 | [diff] [blame] | 113 | void CompilerLLVM::EnsureCompilationUnit() { |
Logan Chien | ce11906 | 2012-03-02 11:57:34 +0800 | [diff] [blame] | 114 | compiler_lock_.AssertHeld(); |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 115 | |
| 116 | if (curr_cunit_ != NULL) { |
| 117 | return; |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 118 | } |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 119 | |
| 120 | // Allocate compilation unit |
| 121 | size_t cunit_idx = cunits_.size(); |
| 122 | |
Logan Chien | 6546ec5 | 2012-03-17 20:08:29 +0800 | [diff] [blame] | 123 | curr_cunit_ = new CompilationUnit(insn_set_, cunit_idx); |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 124 | |
| 125 | // Setup output filename |
| 126 | curr_cunit_->SetElfFileName( |
| 127 | StringPrintf("%s-%zu", elf_filename_.c_str(), cunit_idx)); |
| 128 | |
| 129 | if (IsBitcodeFileNameAvailable()) { |
| 130 | curr_cunit_->SetBitcodeFileName( |
| 131 | StringPrintf("%s-%zu", bitcode_filename_.c_str(), cunit_idx)); |
| 132 | } |
| 133 | |
| 134 | // Register compilation unit |
| 135 | cunits_.push_back(curr_cunit_); |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 136 | } |
| 137 | |
| 138 | |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 139 | void CompilerLLVM::MaterializeRemainder() { |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 140 | MutexLock GUARD(compiler_lock_); |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 141 | if (curr_cunit_ != NULL) { |
Logan Chien | ce11906 | 2012-03-02 11:57:34 +0800 | [diff] [blame] | 142 | Materialize(); |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 143 | } |
| 144 | } |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 145 | |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 146 | |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 147 | void CompilerLLVM::MaterializeIfThresholdReached() { |
| 148 | MutexLock GUARD(compiler_lock_); |
| 149 | if (curr_cunit_ != NULL && curr_cunit_->IsMaterializeThresholdReached()) { |
Logan Chien | ce11906 | 2012-03-02 11:57:34 +0800 | [diff] [blame] | 150 | Materialize(); |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 151 | } |
| 152 | } |
| 153 | |
| 154 | |
Logan Chien | ce11906 | 2012-03-02 11:57:34 +0800 | [diff] [blame] | 155 | void CompilerLLVM::Materialize() { |
| 156 | compiler_lock_.AssertHeld(); |
| 157 | |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 158 | DCHECK(curr_cunit_ != NULL); |
| 159 | DCHECK(!curr_cunit_->IsMaterialized()); |
| 160 | |
| 161 | // Write bitcode to file when filename is set |
| 162 | if (IsBitcodeFileNameAvailable()) { |
| 163 | curr_cunit_->WriteBitcodeToFile(); |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 164 | } |
| 165 | |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 166 | // Materialize the llvm::Module into ELF object file |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 167 | curr_cunit_->Materialize(); |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 168 | |
| 169 | // Delete the compilation unit |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 170 | curr_cunit_ = NULL; |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 171 | } |
| 172 | |
| 173 | |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 174 | CompiledMethod* CompilerLLVM:: |
| 175 | CompileDexMethod(OatCompilationUnit* oat_compilation_unit) { |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 176 | MutexLock GUARD(compiler_lock_); |
| 177 | |
Logan Chien | ce11906 | 2012-03-02 11:57:34 +0800 | [diff] [blame] | 178 | EnsureCompilationUnit(); |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 179 | |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 180 | UniquePtr<MethodCompiler> method_compiler( |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 181 | new MethodCompiler(curr_cunit_, compiler_, oat_compilation_unit)); |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 182 | |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 183 | return method_compiler->Compile(); |
Shih-wei Liao | d1fec81 | 2012-02-13 09:51:10 -0800 | [diff] [blame] | 184 | } |
Logan Chien | 8342616 | 2011-12-09 09:29:50 +0800 | [diff] [blame] | 185 | |
| 186 | |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 187 | CompiledMethod* CompilerLLVM:: |
| 188 | CompileNativeMethod(OatCompilationUnit* oat_compilation_unit) { |
Logan Chien | 88894ee | 2012-02-13 16:42:22 +0800 | [diff] [blame] | 189 | MutexLock GUARD(compiler_lock_); |
| 190 | |
Logan Chien | ce11906 | 2012-03-02 11:57:34 +0800 | [diff] [blame] | 191 | EnsureCompilationUnit(); |
Logan Chien | 88894ee | 2012-02-13 16:42:22 +0800 | [diff] [blame] | 192 | |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 193 | UniquePtr<JniCompiler> jni_compiler( |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 194 | new JniCompiler(curr_cunit_, *compiler_, oat_compilation_unit)); |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 195 | |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 196 | return jni_compiler->Compile(); |
Logan Chien | 88894ee | 2012-02-13 16:42:22 +0800 | [diff] [blame] | 197 | } |
| 198 | |
| 199 | |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 200 | CompiledInvokeStub* CompilerLLVM::CreateInvokeStub(bool is_static, |
| 201 | char const *shorty) { |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 202 | MutexLock GUARD(compiler_lock_); |
| 203 | |
Logan Chien | ce11906 | 2012-03-02 11:57:34 +0800 | [diff] [blame] | 204 | EnsureCompilationUnit(); |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 205 | |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 206 | UniquePtr<UpcallCompiler> upcall_compiler( |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 207 | new UpcallCompiler(curr_cunit_, *compiler_)); |
Logan Chien | 8b977d3 | 2012-02-21 19:14:55 +0800 | [diff] [blame] | 208 | |
Logan Chien | 7f76761 | 2012-03-01 18:54:49 +0800 | [diff] [blame] | 209 | return upcall_compiler->CreateStub(is_static, shorty); |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 210 | } |
| 211 | |
Elliott Hughes | 6f4976c | 2012-03-13 21:19:01 -0700 | [diff] [blame] | 212 | CompilerLLVM* EnsureCompilerLLVM(art::Compiler& compiler) { |
| 213 | if (compiler.GetCompilerContext() == NULL) { |
| 214 | compiler.SetCompilerContext(new CompilerLLVM(&compiler, compiler.GetInstructionSet())); |
| 215 | } |
| 216 | CompilerLLVM* compiler_llvm = reinterpret_cast<CompilerLLVM*>(compiler.GetCompilerContext()); |
| 217 | compiler_llvm->SetElfFileName(compiler.GetElfFileName()); |
| 218 | compiler_llvm->SetBitcodeFileName(compiler.GetBitcodeFileName()); |
| 219 | return compiler_llvm; |
| 220 | } |
Logan Chien | f04364f | 2012-02-10 12:01:39 +0800 | [diff] [blame] | 221 | |
Logan Chien | 8342616 | 2011-12-09 09:29:50 +0800 | [diff] [blame] | 222 | } // namespace compiler_llvm |
| 223 | } // namespace art |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 224 | |
Elliott Hughes | 3fa1b7e | 2012-03-13 17:06:22 -0700 | [diff] [blame] | 225 | extern "C" art::CompiledMethod* ArtCompileMethod(art::Compiler& compiler, |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 226 | const art::DexFile::CodeItem* code_item, |
| 227 | uint32_t access_flags, uint32_t method_idx, |
| 228 | const art::ClassLoader* class_loader, |
| 229 | const art::DexFile& dex_file) |
| 230 | { |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 231 | art::ClassLinker *class_linker = art::Runtime::Current()->GetClassLinker(); |
| 232 | art::DexCache *dex_cache = class_linker->FindDexCache(dex_file); |
| 233 | |
| 234 | art::OatCompilationUnit oat_compilation_unit( |
| 235 | class_loader, class_linker, dex_file, *dex_cache, code_item, |
| 236 | method_idx, access_flags); |
| 237 | |
Elliott Hughes | 6f4976c | 2012-03-13 21:19:01 -0700 | [diff] [blame] | 238 | return art::compiler_llvm::EnsureCompilerLLVM(compiler)->CompileDexMethod(&oat_compilation_unit); |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 239 | } |
| 240 | |
| 241 | extern "C" art::CompiledMethod* ArtJniCompileMethod(art::Compiler& compiler, |
| 242 | uint32_t access_flags, uint32_t method_idx, |
| 243 | const art::ClassLoader* class_loader, |
| 244 | const art::DexFile& dex_file) { |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 245 | art::ClassLinker *class_linker = art::Runtime::Current()->GetClassLinker(); |
| 246 | art::DexCache *dex_cache = class_linker->FindDexCache(dex_file); |
| 247 | |
| 248 | art::OatCompilationUnit oat_compilation_unit( |
| 249 | class_loader, class_linker, dex_file, *dex_cache, NULL, |
| 250 | method_idx, access_flags); |
| 251 | |
Elliott Hughes | 6f4976c | 2012-03-13 21:19:01 -0700 | [diff] [blame] | 252 | art::compiler_llvm::CompilerLLVM* compiler_llvm = art::compiler_llvm::EnsureCompilerLLVM(compiler); |
| 253 | art::CompiledMethod* result = compiler_llvm->CompileNativeMethod(&oat_compilation_unit); |
| 254 | compiler_llvm->MaterializeIfThresholdReached(); |
Elliott Hughes | 13b835a | 2012-03-13 19:45:22 -0700 | [diff] [blame] | 255 | return result; |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 256 | } |
| 257 | |
| 258 | extern "C" art::CompiledInvokeStub* ArtCreateInvokeStub(art::Compiler& compiler, bool is_static, |
| 259 | const char* shorty, uint32_t shorty_len) { |
Elliott Hughes | 6f4976c | 2012-03-13 21:19:01 -0700 | [diff] [blame] | 260 | return art::compiler_llvm::EnsureCompilerLLVM(compiler)->CreateInvokeStub(is_static, shorty); |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 261 | } |
| 262 | |
| 263 | extern "C" void compilerLLVMMaterializeRemainder(art::Compiler& compiler) { |
Elliott Hughes | 6f4976c | 2012-03-13 21:19:01 -0700 | [diff] [blame] | 264 | art::compiler_llvm::EnsureCompilerLLVM(compiler)->MaterializeRemainder(); |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 265 | } |
| 266 | |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 267 | // Note: Using this function carefully!!! This is temporary solution, we will remove it. |
| 268 | extern "C" art::MutexLock* compilerLLVMMutexLock(art::Compiler& compiler) { |
Elliott Hughes | 6f4976c | 2012-03-13 21:19:01 -0700 | [diff] [blame] | 269 | return new art::MutexLock(art::compiler_llvm::EnsureCompilerLLVM(compiler)->compiler_lock_); |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 270 | } |
| 271 | |
| 272 | extern "C" void compilerLLVMDispose(art::Compiler& compiler) { |
Elliott Hughes | 6f4976c | 2012-03-13 21:19:01 -0700 | [diff] [blame] | 273 | delete art::compiler_llvm::EnsureCompilerLLVM(compiler); |
Shih-wei Liao | c4c9881 | 2012-03-10 21:55:51 -0800 | [diff] [blame] | 274 | } |