buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 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 | #ifndef ART_SRC_COMPILER_COMPILERCODEGEN_H_ |
| 18 | #define ART_SRC_COMPILER_COMPILERCODEGEN_H_ |
| 19 | |
| 20 | #include "../CompilerIR.h" |
| 21 | |
Elliott Hughes | 11d1b0c | 2012-01-23 16:57:47 -0800 | [diff] [blame] | 22 | namespace art { |
| 23 | |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 24 | /* Lower middle-level IR to low-level IR for the whole method */ |
| 25 | void oatMethodMIR2LIR(CompilationUnit* cUnit); |
| 26 | |
| 27 | /* Assemble LIR into machine code */ |
| 28 | void oatAssembleLIR(CompilationUnit* cUnit); |
buzbee | e3acd07 | 2012-02-25 17:03:10 -0800 | [diff] [blame] | 29 | AssemblerStatus oatAssembleInstructions(CompilationUnit* cUnit, |
| 30 | intptr_t startAddr); |
| 31 | void oatAssignOffsets(CompilationUnit* cUnit); |
| 32 | int oatAssignInsnOffsets(CompilationUnit* cUnit); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 33 | |
| 34 | /* Implemented in the codegen/<target>/ArchUtility.c */ |
| 35 | void oatCodegenDump(CompilationUnit* cUnit); |
buzbee | 67bc236 | 2011-10-11 18:08:40 -0700 | [diff] [blame] | 36 | void oatDumpPromotionMap(CompilationUnit* cUnit); |
| 37 | void oatDumpFullPromotionMap(CompilationUnit* cUnit); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 38 | |
| 39 | /* Implemented in codegen/<target>/Ralloc.c */ |
| 40 | void oatSimpleRegAlloc(CompilationUnit* cUnit); |
| 41 | |
| 42 | /* Implemented in codegen/<target>/Thumb<version>Util.c */ |
| 43 | void oatInitializeRegAlloc(CompilationUnit* cUnit); |
| 44 | |
| 45 | /* Implemented in codegen/<target>/<target_variant>/ArchVariant.c */ |
| 46 | OatInstructionSetType oatInstructionSet(void); |
| 47 | |
| 48 | /* |
| 49 | * Implemented in codegen/<target>/<target_variant>/ArchVariant.c |
| 50 | * Architecture-specific initializations and checks |
| 51 | */ |
| 52 | bool oatArchVariantInit(void); |
| 53 | |
| 54 | /* Implemented in codegen/<target>/<target_variant>/ArchVariant.c */ |
| 55 | int oatTargetOptHint(int key); |
| 56 | |
| 57 | /* Implemented in codegen/<target>/<target_variant>/ArchVariant.c */ |
| 58 | void oatGenMemBarrier(CompilationUnit* cUnit, int barrierKind); |
| 59 | |
Elliott Hughes | 11d1b0c | 2012-01-23 16:57:47 -0800 | [diff] [blame] | 60 | } // namespace art |
| 61 | |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 62 | #endif // ART_SRC_COMPILER_COMPILERCODEGEN_H_ |