blob: deebaf741419d63cd77862035c3208d391eba3e4 [file] [log] [blame]
Nicolas Geoffrayb34f69a2014-03-07 15:28:39 +00001/*
2 * Copyright (C) 2014 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
Andreas Gampe53c913b2014-08-12 23:19:23 -070017#include "optimizing_compiler.h"
18
Nicolas Geoffrayf635e632014-05-14 09:43:38 +010019#include <fstream>
Nicolas Geoffray787c3072014-03-17 10:20:19 +000020#include <stdint.h>
21
Mingyao Yangf384f882014-10-22 16:08:18 -070022#include "bounds_check_elimination.h"
Nicolas Geoffray787c3072014-03-17 10:20:19 +000023#include "builder.h"
24#include "code_generator.h"
Andreas Gampe53c913b2014-08-12 23:19:23 -070025#include "compiler.h"
Roland Levillain75be2832014-10-17 17:02:00 +010026#include "constant_folding.h"
27#include "dead_code_elimination.h"
Nicolas Geoffray787c3072014-03-17 10:20:19 +000028#include "driver/compiler_driver.h"
Nicolas Geoffray92cf83e2014-03-18 17:59:20 +000029#include "driver/dex_compilation_unit.h"
Nicolas Geoffraye2dc6fa2014-11-17 12:55:12 +000030#include "elf_writer_quick.h"
Nicolas Geoffrayf635e632014-05-14 09:43:38 +010031#include "graph_visualizer.h"
Nicolas Geoffrayd31cf3d2014-09-08 17:30:24 +010032#include "gvn.h"
Nicolas Geoffraye53798a2014-12-01 10:31:54 +000033#include "inliner.h"
Nicolas Geoffray3c049742014-09-24 18:10:46 +010034#include "instruction_simplifier.h"
Nicolas Geoffraye2dc6fa2014-11-17 12:55:12 +000035#include "jni/quick/jni_compiler.h"
36#include "mirror/art_method-inl.h"
Nicolas Geoffray787c3072014-03-17 10:20:19 +000037#include "nodes.h"
Nicolas Geoffray26a25ef2014-09-30 13:54:09 +010038#include "prepare_for_register_allocation.h"
Nicolas Geoffraya7062e02014-05-22 12:50:17 +010039#include "register_allocator.h"
Nicolas Geoffray31596742014-11-24 15:28:45 +000040#include "ssa_builder.h"
Nicolas Geoffray7dc206a2014-07-11 09:49:49 +010041#include "ssa_phi_elimination.h"
Nicolas Geoffray804d0932014-05-02 08:46:00 +010042#include "ssa_liveness_analysis.h"
Nicolas Geoffray787c3072014-03-17 10:20:19 +000043#include "utils/arena_allocator.h"
Nicolas Geoffrayb34f69a2014-03-07 15:28:39 +000044
45namespace art {
46
Nicolas Geoffray787c3072014-03-17 10:20:19 +000047/**
48 * Used by the code generator, to allocate the code in a vector.
49 */
50class CodeVectorAllocator FINAL : public CodeAllocator {
51 public:
Nicolas Geoffray88157ef2014-09-12 10:29:53 +010052 CodeVectorAllocator() {}
Nicolas Geoffray787c3072014-03-17 10:20:19 +000053
54 virtual uint8_t* Allocate(size_t size) {
55 size_ = size;
Nicolas Geoffray92cf83e2014-03-18 17:59:20 +000056 memory_.resize(size);
Nicolas Geoffray787c3072014-03-17 10:20:19 +000057 return &memory_[0];
58 }
59
60 size_t GetSize() const { return size_; }
Nicolas Geoffray92cf83e2014-03-18 17:59:20 +000061 const std::vector<uint8_t>& GetMemory() const { return memory_; }
Nicolas Geoffray787c3072014-03-17 10:20:19 +000062
63 private:
64 std::vector<uint8_t> memory_;
65 size_t size_;
66
67 DISALLOW_COPY_AND_ASSIGN(CodeVectorAllocator);
68};
69
Nicolas Geoffrayf635e632014-05-14 09:43:38 +010070/**
71 * If set to true, generates a file suitable for the c1visualizer tool and IRHydra.
72 */
73static bool kIsVisualizerEnabled = false;
74
75/**
76 * Filter to apply to the visualizer. Methods whose name contain that filter will
77 * be in the file.
78 */
79static const char* kStringFilter = "";
80
Andreas Gampe53c913b2014-08-12 23:19:23 -070081class OptimizingCompiler FINAL : public Compiler {
82 public:
83 explicit OptimizingCompiler(CompilerDriver* driver);
Nicolas Geoffray88157ef2014-09-12 10:29:53 +010084 ~OptimizingCompiler();
Andreas Gampe53c913b2014-08-12 23:19:23 -070085
86 bool CanCompileMethod(uint32_t method_idx, const DexFile& dex_file, CompilationUnit* cu) const
87 OVERRIDE;
88
89 CompiledMethod* Compile(const DexFile::CodeItem* code_item,
90 uint32_t access_flags,
91 InvokeType invoke_type,
92 uint16_t class_def_idx,
93 uint32_t method_idx,
94 jobject class_loader,
95 const DexFile& dex_file) const OVERRIDE;
96
Andreas Gampe53c913b2014-08-12 23:19:23 -070097 CompiledMethod* JniCompile(uint32_t access_flags,
98 uint32_t method_idx,
99 const DexFile& dex_file) const OVERRIDE;
100
101 uintptr_t GetEntryPointOf(mirror::ArtMethod* method) const OVERRIDE
102 SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
103
104 bool WriteElf(art::File* file,
105 OatWriter* oat_writer,
106 const std::vector<const art::DexFile*>& dex_files,
107 const std::string& android_root,
108 bool is_host) const OVERRIDE SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
109
Nicolas Geoffraye2dc6fa2014-11-17 12:55:12 +0000110 Backend* GetCodeGenerator(CompilationUnit* cu ATTRIBUTE_UNUSED,
111 void* compilation_unit ATTRIBUTE_UNUSED) const OVERRIDE {
112 return nullptr;
113 }
Andreas Gampe53c913b2014-08-12 23:19:23 -0700114
Nicolas Geoffraye2dc6fa2014-11-17 12:55:12 +0000115 void InitCompilationUnit(CompilationUnit& cu ATTRIBUTE_UNUSED) const OVERRIDE {}
Andreas Gampe53c913b2014-08-12 23:19:23 -0700116
Nicolas Geoffraye2dc6fa2014-11-17 12:55:12 +0000117 void Init() const OVERRIDE {}
Andreas Gampe53c913b2014-08-12 23:19:23 -0700118
Nicolas Geoffraye2dc6fa2014-11-17 12:55:12 +0000119 void UnInit() const OVERRIDE {}
Andreas Gampe53c913b2014-08-12 23:19:23 -0700120
121 private:
Nicolas Geoffray88157ef2014-09-12 10:29:53 +0100122 // Whether we should run any optimization or register allocation. If false, will
123 // just run the code generation after the graph was built.
124 const bool run_optimizations_;
Calin Juravle48c2b032014-12-09 18:11:36 +0000125
126 mutable OptimizingCompilerStats compilation_stats_;
Nicolas Geoffray88157ef2014-09-12 10:29:53 +0100127
Andreas Gampe53c913b2014-08-12 23:19:23 -0700128 std::unique_ptr<std::ostream> visualizer_output_;
129
Andreas Gampe53c913b2014-08-12 23:19:23 -0700130 DISALLOW_COPY_AND_ASSIGN(OptimizingCompiler);
131};
132
Nicolas Geoffray88157ef2014-09-12 10:29:53 +0100133static const int kMaximumCompilationTimeBeforeWarning = 100; /* ms */
134
135OptimizingCompiler::OptimizingCompiler(CompilerDriver* driver)
136 : Compiler(driver, kMaximumCompilationTimeBeforeWarning),
137 run_optimizations_(
138 driver->GetCompilerOptions().GetCompilerFilter() != CompilerOptions::kTime),
Calin Juravle48c2b032014-12-09 18:11:36 +0000139 compilation_stats_() {
Nicolas Geoffrayf635e632014-05-14 09:43:38 +0100140 if (kIsVisualizerEnabled) {
141 visualizer_output_.reset(new std::ofstream("art.cfg"));
142 }
143}
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000144
Nicolas Geoffray88157ef2014-09-12 10:29:53 +0100145OptimizingCompiler::~OptimizingCompiler() {
Calin Juravle48c2b032014-12-09 18:11:36 +0000146 compilation_stats_.Log();
Nicolas Geoffray88157ef2014-09-12 10:29:53 +0100147}
148
Nicolas Geoffraye2dc6fa2014-11-17 12:55:12 +0000149bool OptimizingCompiler::CanCompileMethod(uint32_t method_idx ATTRIBUTE_UNUSED,
150 const DexFile& dex_file ATTRIBUTE_UNUSED,
151 CompilationUnit* cu ATTRIBUTE_UNUSED) const {
152 return true;
Andreas Gampe53c913b2014-08-12 23:19:23 -0700153}
154
155CompiledMethod* OptimizingCompiler::JniCompile(uint32_t access_flags,
156 uint32_t method_idx,
157 const DexFile& dex_file) const {
Nicolas Geoffraye2dc6fa2014-11-17 12:55:12 +0000158 return ArtQuickJniCompileMethod(GetCompilerDriver(), access_flags, method_idx, dex_file);
Andreas Gampe53c913b2014-08-12 23:19:23 -0700159}
160
161uintptr_t OptimizingCompiler::GetEntryPointOf(mirror::ArtMethod* method) const {
Nicolas Geoffray4179cc12014-11-19 08:35:17 +0000162 return reinterpret_cast<uintptr_t>(method->GetEntryPointFromQuickCompiledCodePtrSize(
163 InstructionSetPointerSize(GetCompilerDriver()->GetInstructionSet())));
Andreas Gampe53c913b2014-08-12 23:19:23 -0700164}
165
166bool OptimizingCompiler::WriteElf(art::File* file, OatWriter* oat_writer,
167 const std::vector<const art::DexFile*>& dex_files,
168 const std::string& android_root, bool is_host) const {
Nicolas Geoffraye2dc6fa2014-11-17 12:55:12 +0000169 return art::ElfWriterQuick32::Create(file, oat_writer, dex_files, android_root, is_host,
170 *GetCompilerDriver());
Andreas Gampe53c913b2014-08-12 23:19:23 -0700171}
172
Nicolas Geoffray1ba0f592014-10-27 15:14:55 +0000173static bool IsInstructionSetSupported(InstructionSet instruction_set) {
174 return instruction_set == kArm64
175 || (instruction_set == kThumb2 && !kArm32QuickCodeUseSoftFloat)
176 || instruction_set == kX86
177 || instruction_set == kX86_64;
178}
179
Nicolas Geoffrayde58ab22014-11-05 12:46:03 +0000180static bool CanOptimize(const DexFile::CodeItem& code_item) {
181 // TODO: We currently cannot optimize methods with try/catch.
182 return code_item.tries_size_ == 0;
183}
184
Nicolas Geoffraye53798a2014-12-01 10:31:54 +0000185static void RunOptimizations(HGraph* graph,
186 CompilerDriver* driver,
187 OptimizingCompilerStats* stats,
188 const DexCompilationUnit& dex_compilation_unit,
189 const HGraphVisualizer& visualizer) {
190 SsaRedundantPhiElimination redundant_phi(graph);
191 SsaDeadPhiElimination dead_phi(graph);
192 HDeadCodeElimination dce(graph);
193 HConstantFolding fold(graph);
194 InstructionSimplifier simplify1(graph);
195
196 HInliner inliner(graph, dex_compilation_unit, driver, stats);
197
198 GVNOptimization gvn(graph);
Mingyao Yangf384f882014-10-22 16:08:18 -0700199 BoundsCheckElimination bce(graph);
Nicolas Geoffraye53798a2014-12-01 10:31:54 +0000200 InstructionSimplifier simplify2(graph);
Nicolas Geoffray5e6916c2014-11-18 16:53:35 +0000201
Nicolas Geoffray31596742014-11-24 15:28:45 +0000202 HOptimization* optimizations[] = {
Nicolas Geoffraye53798a2014-12-01 10:31:54 +0000203 &redundant_phi,
204 &dead_phi,
205 &dce,
206 &fold,
207 &simplify1,
208 &inliner,
209 &gvn,
Mingyao Yangf384f882014-10-22 16:08:18 -0700210 &bce,
Nicolas Geoffraye53798a2014-12-01 10:31:54 +0000211 &simplify2
Nicolas Geoffray31596742014-11-24 15:28:45 +0000212 };
Nicolas Geoffray5e6916c2014-11-18 16:53:35 +0000213
214 for (size_t i = 0; i < arraysize(optimizations); ++i) {
215 HOptimization* optimization = optimizations[i];
216 optimization->Run();
Nicolas Geoffray5e6916c2014-11-18 16:53:35 +0000217 visualizer.DumpGraph(optimization->GetPassName());
Nicolas Geoffray31596742014-11-24 15:28:45 +0000218 optimization->Check();
Nicolas Geoffray5e6916c2014-11-18 16:53:35 +0000219 }
220}
221
Nicolas Geoffray376b2bb2014-12-09 14:26:32 +0000222// The stack map we generate must be 4-byte aligned on ARM. Since existing
223// maps are generated alongside these stack maps, we must also align them.
224static std::vector<uint8_t>& AlignVectorSize(std::vector<uint8_t>& vector) {
225 size_t size = vector.size();
226 size_t aligned_size = RoundUp(size, 4);
227 for (; size < aligned_size; ++size) {
228 vector.push_back(0);
229 }
230 return vector;
231}
232
Nicolas Geoffraye2dc6fa2014-11-17 12:55:12 +0000233CompiledMethod* OptimizingCompiler::Compile(const DexFile::CodeItem* code_item,
234 uint32_t access_flags,
235 InvokeType invoke_type,
236 uint16_t class_def_idx,
237 uint32_t method_idx,
238 jobject class_loader,
239 const DexFile& dex_file) const {
Ian Rogers6a3c1fc2014-10-31 00:33:20 -0700240 UNUSED(invoke_type);
Calin Juravle48c2b032014-12-09 18:11:36 +0000241 compilation_stats_.RecordStat(MethodCompilationStat::kAttemptCompilation);
Nicolas Geoffray8fb5ce32014-07-04 09:43:26 +0100242 InstructionSet instruction_set = GetCompilerDriver()->GetInstructionSet();
Nicolas Geoffray8d486732014-07-16 16:23:40 +0100243 // Always use the thumb2 assembler: some runtime functionality (like implicit stack
244 // overflow checks) assume thumb2.
245 if (instruction_set == kArm) {
246 instruction_set = kThumb2;
Nicolas Geoffray8fb5ce32014-07-04 09:43:26 +0100247 }
248
249 // Do not attempt to compile on architectures we do not support.
Nicolas Geoffray1ba0f592014-10-27 15:14:55 +0000250 if (!IsInstructionSetSupported(instruction_set)) {
Calin Juravle48c2b032014-12-09 18:11:36 +0000251 compilation_stats_.RecordStat(MethodCompilationStat::kNotCompiledUnsupportedIsa);
Nicolas Geoffray8fb5ce32014-07-04 09:43:26 +0100252 return nullptr;
253 }
254
Nicolas Geoffrayb5f62b32014-10-30 10:58:41 +0000255 if (Compiler::IsPathologicalCase(*code_item, method_idx, dex_file)) {
Calin Juravle48c2b032014-12-09 18:11:36 +0000256 compilation_stats_.RecordStat(MethodCompilationStat::kNotCompiledPathological);
Nicolas Geoffrayb5f62b32014-10-30 10:58:41 +0000257 return nullptr;
258 }
259
Nicolas Geoffray92cf83e2014-03-18 17:59:20 +0000260 DexCompilationUnit dex_compilation_unit(
261 nullptr, class_loader, art::Runtime::Current()->GetClassLinker(), dex_file, code_item,
Ian Rogers72d32622014-05-06 16:20:11 -0700262 class_def_idx, method_idx, access_flags,
263 GetCompilerDriver()->GetVerifiedMethod(&dex_file, method_idx));
Nicolas Geoffray92cf83e2014-03-18 17:59:20 +0000264
Nicolas Geoffraye53798a2014-12-01 10:31:54 +0000265 std::string method_name = PrettyMethod(method_idx, dex_file);
266
Nicolas Geoffray8ccc3f52014-03-19 10:34:11 +0000267 // For testing purposes, we put a special marker on method names that should be compiled
268 // with this compiler. This makes sure we're not regressing.
Nicolas Geoffraye53798a2014-12-01 10:31:54 +0000269 bool shouldCompile = method_name.find("$opt$") != std::string::npos;
270 bool shouldOptimize = method_name.find("$opt$reg$") != std::string::npos;
Nicolas Geoffray8ccc3f52014-03-19 10:34:11 +0000271
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000272 ArenaPool pool;
273 ArenaAllocator arena(&pool);
Calin Juravle48c2b032014-12-09 18:11:36 +0000274 HGraphBuilder builder(&arena,
275 &dex_compilation_unit,
Nicolas Geoffraye53798a2014-12-01 10:31:54 +0000276 &dex_compilation_unit,
277 &dex_file,
278 GetCompilerDriver(),
Calin Juravle48c2b032014-12-09 18:11:36 +0000279 &compilation_stats_);
Nicolas Geoffrayf635e632014-05-14 09:43:38 +0100280
Nicolas Geoffraye53798a2014-12-01 10:31:54 +0000281 VLOG(compiler) << "Building " << PrettyMethod(method_idx, dex_file);
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000282 HGraph* graph = builder.BuildGraph(*code_item);
283 if (graph == nullptr) {
Zheng Xu5667fdb2014-10-23 18:29:55 +0800284 CHECK(!shouldCompile) << "Could not build graph in optimizing compiler";
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000285 return nullptr;
286 }
287
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000288 CodeGenerator* codegen = CodeGenerator::Create(&arena, graph, instruction_set);
289 if (codegen == nullptr) {
Zheng Xu5667fdb2014-10-23 18:29:55 +0800290 CHECK(!shouldCompile) << "Could not find code generator for optimizing compiler";
Calin Juravle48c2b032014-12-09 18:11:36 +0000291 compilation_stats_.RecordStat(MethodCompilationStat::kNotCompiledNoCodegen);
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000292 return nullptr;
293 }
294
Nicolas Geoffraya7062e02014-05-22 12:50:17 +0100295 HGraphVisualizer visualizer(
Nicolas Geoffraye53798a2014-12-01 10:31:54 +0000296 visualizer_output_.get(), graph, kStringFilter, *codegen, method_name.c_str());
Nicolas Geoffraya7062e02014-05-22 12:50:17 +0100297 visualizer.DumpGraph("builder");
298
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000299 CodeVectorAllocator allocator;
Nicolas Geoffray86dbb9a2014-06-04 11:12:39 +0100300
Calin Juravle48c2b032014-12-09 18:11:36 +0000301 bool can_optimize = CanOptimize(*code_item);
302 bool can_allocate_registers = RegisterAllocator::CanAllocateRegistersFor(*graph, instruction_set);
303 if (run_optimizations_ && can_optimize && can_allocate_registers) {
Nicolas Geoffray43a539f2014-12-02 10:19:51 +0000304 VLOG(compiler) << "Optimizing " << PrettyMethod(method_idx, dex_file);
Nicolas Geoffraye53798a2014-12-01 10:31:54 +0000305 if (!graph->TryBuildingSsa()) {
306 LOG(INFO) << "Skipping compilation of "
307 << PrettyMethod(method_idx, dex_file)
308 << ": it contains a non natural loop";
Nicolas Geoffrayf5370122014-12-02 11:51:19 +0000309 // We could not transform the graph to SSA, bailout.
Calin Juravle48c2b032014-12-09 18:11:36 +0000310 compilation_stats_.RecordStat(MethodCompilationStat::kNotCompiledCannotBuildSSA);
Nicolas Geoffrayf5370122014-12-02 11:51:19 +0000311 return nullptr;
312 }
Nicolas Geoffraye53798a2014-12-01 10:31:54 +0000313 RunOptimizations(
314 graph, GetCompilerDriver(), &compilation_stats_, dex_compilation_unit, visualizer);
Roland Levillain75be2832014-10-17 17:02:00 +0100315
Nicolas Geoffray26a25ef2014-09-30 13:54:09 +0100316 PrepareForRegisterAllocation(graph).Run();
Nicolas Geoffray86dbb9a2014-06-04 11:12:39 +0100317 SsaLivenessAnalysis liveness(*graph, codegen);
318 liveness.Analyze();
319 visualizer.DumpGraph(kLivenessPassName);
320
321 RegisterAllocator register_allocator(graph->GetArena(), codegen, liveness);
322 register_allocator.AllocateRegisters();
323
324 visualizer.DumpGraph(kRegisterAllocatorPassName);
325 codegen->CompileOptimized(&allocator);
Nicolas Geoffray39468442014-09-02 15:17:15 +0100326
Nicolas Geoffray39468442014-09-02 15:17:15 +0100327 std::vector<uint8_t> stack_map;
328 codegen->BuildStackMaps(&stack_map);
329
Calin Juravle48c2b032014-12-09 18:11:36 +0000330 compilation_stats_.RecordStat(MethodCompilationStat::kCompiledOptimized);
Nicolas Geoffray39468442014-09-02 15:17:15 +0100331 return new CompiledMethod(GetCompilerDriver(),
332 instruction_set,
333 allocator.GetMemory(),
334 codegen->GetFrameSize(),
335 codegen->GetCoreSpillMask(),
336 0, /* FPR spill mask, unused */
Nicolas Geoffray39468442014-09-02 15:17:15 +0100337 stack_map);
Nicolas Geoffray86dbb9a2014-06-04 11:12:39 +0100338 } else if (shouldOptimize && RegisterAllocator::Supports(instruction_set)) {
339 LOG(FATAL) << "Could not allocate registers in optimizing compiler";
Zheng Xu5667fdb2014-10-23 18:29:55 +0800340 UNREACHABLE();
Nicolas Geoffray86dbb9a2014-06-04 11:12:39 +0100341 } else {
Nicolas Geoffray43a539f2014-12-02 10:19:51 +0000342 VLOG(compiler) << "Compile baseline " << PrettyMethod(method_idx, dex_file);
Calin Juravle48c2b032014-12-09 18:11:36 +0000343
344 if (!run_optimizations_) {
345 compilation_stats_.RecordStat(MethodCompilationStat::kNotOptimizedDisabled);
346 } else if (!can_optimize) {
347 compilation_stats_.RecordStat(MethodCompilationStat::kNotOptimizedTryCatch);
348 } else if (!can_allocate_registers) {
349 compilation_stats_.RecordStat(MethodCompilationStat::kNotOptimizedRegisterAllocator);
350 }
351
Nicolas Geoffray86dbb9a2014-06-04 11:12:39 +0100352 codegen->CompileBaseline(&allocator);
353
Nicolas Geoffray39468442014-09-02 15:17:15 +0100354 std::vector<uint8_t> mapping_table;
355 SrcMap src_mapping_table;
356 codegen->BuildMappingTable(&mapping_table,
357 GetCompilerDriver()->GetCompilerOptions().GetIncludeDebugSymbols() ?
358 &src_mapping_table : nullptr);
359 std::vector<uint8_t> vmap_table;
360 codegen->BuildVMapTable(&vmap_table);
361 std::vector<uint8_t> gc_map;
362 codegen->BuildNativeGCMap(&gc_map, dex_compilation_unit);
363
Calin Juravle48c2b032014-12-09 18:11:36 +0000364 compilation_stats_.RecordStat(MethodCompilationStat::kCompiledBaseline);
Nicolas Geoffray39468442014-09-02 15:17:15 +0100365 return new CompiledMethod(GetCompilerDriver(),
366 instruction_set,
367 allocator.GetMemory(),
368 codegen->GetFrameSize(),
369 codegen->GetCoreSpillMask(),
370 0, /* FPR spill mask, unused */
371 &src_mapping_table,
Nicolas Geoffray376b2bb2014-12-09 14:26:32 +0000372 AlignVectorSize(mapping_table),
373 AlignVectorSize(vmap_table),
374 AlignVectorSize(gc_map),
Nicolas Geoffray39468442014-09-02 15:17:15 +0100375 nullptr);
Nicolas Geoffray86dbb9a2014-06-04 11:12:39 +0100376 }
Nicolas Geoffrayb34f69a2014-03-07 15:28:39 +0000377}
378
Andreas Gampe53c913b2014-08-12 23:19:23 -0700379Compiler* CreateOptimizingCompiler(CompilerDriver* driver) {
380 return new OptimizingCompiler(driver);
381}
382
Nicolas Geoffrayb34f69a2014-03-07 15:28:39 +0000383} // namespace art