diff options
Diffstat (limited to 'compiler/compiler_backend.h')
-rw-r--r-- | compiler/compiler_backend.h | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/compiler/compiler_backend.h b/compiler/compiler_backend.h index 01a69afc89..b473806bba 100644 --- a/compiler/compiler_backend.h +++ b/compiler/compiler_backend.h @@ -23,7 +23,7 @@ namespace art { class Backend; -class CompilationUnit; +struct CompilationUnit; class CompilerDriver; class CompiledMethod; class MIRGraph; @@ -40,8 +40,9 @@ class CompilerBackend { kPortable }; - explicit CompilerBackend(int warning) - : maximum_compilation_time_before_warning_(warning) {} + explicit CompilerBackend(uint64_t warning) + : maximum_compilation_time_before_warning_(warning) { + } static CompilerBackend* Create(Kind kind); @@ -49,7 +50,7 @@ class CompilerBackend { virtual void UnInit(CompilerDriver& driver) const = 0; - virtual CompiledMethod* Compile(CompilerDriver& compiler, + virtual CompiledMethod* Compile(CompilerDriver& driver, const DexFile::CodeItem* code_item, uint32_t access_flags, InvokeType invoke_type, @@ -66,7 +67,7 @@ class CompilerBackend { virtual uintptr_t GetEntryPointOf(mirror::ArtMethod* method) const = 0; virtual bool WriteElf(art::File* file, - OatWriter& oat_writer, + OatWriter* oat_writer, const std::vector<const art::DexFile*>& dex_files, const std::string& android_root, bool is_host, const CompilerDriver& driver) const @@ -79,8 +80,12 @@ class CompilerBackend { return maximum_compilation_time_before_warning_; } - virtual bool IsPortable() const { return false; } - void SetBitcodeFileName(std::string const& filename) { + virtual bool IsPortable() const { + return false; + } + + void SetBitcodeFileName(const CompilerDriver& driver, const std::string& filename) { + UNUSED(driver); UNUSED(filename); } @@ -88,8 +93,21 @@ class CompilerBackend { virtual ~CompilerBackend() {} + /* + * @brief Generate and return Dwarf CFI initialization, if supported by the + * backend. + * @param driver CompilerDriver for this compile. + * @returns nullptr if not supported by backend or a vector of bytes for CFI DWARF + * information. + * @note This is used for backtrace information in generated code. + */ + virtual std::vector<uint8_t>* GetCallFrameInformationInitialization(const CompilerDriver& driver) + const { + return nullptr; + } + private: - uint64_t maximum_compilation_time_before_warning_; + const uint64_t maximum_compilation_time_before_warning_; DISALLOW_COPY_AND_ASSIGN(CompilerBackend); }; |