diff options
| author | 2012-03-01 18:54:49 +0800 | |
|---|---|---|
| committer | 2012-03-01 12:17:05 -0800 | |
| commit | 7f76761d8705b7aa5b1fdd2fc1ebb80250992f4c (patch) | |
| tree | 4a94f53797ce340ec147896baca6333522040637 /src/compiler_llvm/compiler_llvm.h | |
| parent | 94bbf8873848b9c5e99d0f77abe1cda0f038aadb (diff) | |
Cleanup LLVM code generation code.
Materialize the bitcode in the end of CompileClass,
so that the code generation time won't be calculated
in method compilation time.
Change-Id: I1e2bd0b23bcb5c55bd966a31b1df0b8b34922f94
Diffstat (limited to 'src/compiler_llvm/compiler_llvm.h')
| -rw-r--r-- | src/compiler_llvm/compiler_llvm.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/compiler_llvm/compiler_llvm.h b/src/compiler_llvm/compiler_llvm.h index 208edfcd22..3c653a3669 100644 --- a/src/compiler_llvm/compiler_llvm.h +++ b/src/compiler_llvm/compiler_llvm.h @@ -56,7 +56,9 @@ class CompilerLLVM { ~CompilerLLVM(); - void MaterializeEveryCompilationUnit(); + void MaterializeIfThresholdReached(); + + void MaterializeRemainder(); Compiler* GetCompiler() const { return compiler_; @@ -81,21 +83,25 @@ class CompilerLLVM { CompiledInvokeStub* CreateInvokeStub(bool is_static, char const *shorty); private: - void EnsureCompilationUnit(); + void EnsureCompilationUnit(MutexLock& GUARD); - void MaterializeCompilationUnit(); + void Materialize(MutexLock& GUARD); - void MaterializeCompilationUnitSafePoint(); + bool IsBitcodeFileNameAvailable() const { + return !bitcode_filename_.empty(); + } Compiler* compiler_; + public: Mutex compiler_lock_; + private: InstructionSet insn_set_; - UniquePtr<CompilationUnit> cunit_; + CompilationUnit* curr_cunit_; - unsigned cunit_counter_; + std::vector<CompilationUnit*> cunits_; std::string elf_filename_; |