blob: 2b05476c0ac022ae6c86729b5b12b3850dde0b30 [file] [log] [blame]
Ben Chenge9695e52009-06-16 16:11:47 -07001/*
2 * Copyright (C) 2009 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
Ben Chenge9695e52009-06-16 16:11:47 -070017#ifndef _DALVIK_VM_COMPILER_OPTIMIZATION_H
18#define _DALVIK_VM_COMPILER_OPTIMIZATION_H
19
Ben Cheng4238ec22009-08-24 16:32:22 -070020#include "Dalvik.h"
21
Ben Chengdcf3e5d2009-09-11 13:42:05 -070022/*
23 * If the corresponding bit is set in gDvmJit.disableOpt, the selected
24 * optimization will be suppressed.
25 */
26typedef enum optControlVector {
27 kLoadStoreElimination = 0,
28 kLoadHoisting,
Bill Buzbee1465db52009-09-23 17:17:35 -070029 kTrackLiveTemps,
30 kSuppressLoads,
Ben Cheng7a2697d2010-06-07 13:44:23 -070031 kMethodInlining,
Ben Chengcfdeca32011-01-14 11:36:46 -080032 kMethodJit,
Ben Chengdcf3e5d2009-09-11 13:42:05 -070033} optControlVector;
34
Ben Chenge9695e52009-06-16 16:11:47 -070035/* Forward declarations */
36struct CompilationUnit;
37struct LIR;
38
Ben Chenge9695e52009-06-16 16:11:47 -070039void dvmCompilerApplyLocalOptimizations(struct CompilationUnit *cUnit,
40 struct LIR *head,
41 struct LIR *tail);
42
43void dvmCompilerApplyGlobalOptimizations(struct CompilationUnit *cUnit);
44
45#endif /* _DALVIK_VM_COMPILER_OPTIMIZATION_H */