summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/jni_compiler.h
diff options
context:
space:
mode:
author TDYa127 <tdy@google.com> 2012-03-15 21:51:52 -0700
committer Shih-wei Liao <sliao@google.com> 2012-03-26 20:53:38 -0700
commit28f1a147d77ec772db98bed890b50a9ddcff2365 (patch)
treebebca04cea429109260854778da197ae594450d7 /src/compiler_llvm/jni_compiler.h
parent1cb0ae742072b5ea2c7f677e6ad220ba01255dae (diff)
Implement LLVM version of jni_compiler to pass 17 jni_compiler tests.
Because we now have both shadow_frame and sirt (which is just for SirtRef<> in the LLVM version), we define a new function NumStackReferences() as follows: NumStackReferences() = NumSirtReferences() + NumShadowFrameReferences(). (cherry picked from commit 18fe89a14d212da9ec6841f4d19d08482a9610b7) Change-Id: Idd95ee4276801b1555be87934cd9c4f33ab8a88a
Diffstat (limited to 'src/compiler_llvm/jni_compiler.h')
-rw-r--r--src/compiler_llvm/jni_compiler.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/compiler_llvm/jni_compiler.h b/src/compiler_llvm/jni_compiler.h
index a6cdd9c4c8..98129d1251 100644
--- a/src/compiler_llvm/jni_compiler.h
+++ b/src/compiler_llvm/jni_compiler.h
@@ -33,10 +33,14 @@ namespace art {
}
namespace llvm {
+ class AllocaInst;
class Function;
class FunctionType;
+ class BasicBlock;
class LLVMContext;
class Module;
+ class Type;
+ class Value;
}
namespace art {
@@ -57,9 +61,14 @@ class JniCompiler {
void CreateFunction();
llvm::FunctionType* GetFunctionType(uint32_t method_idx,
- bool is_static);
+ bool is_static, bool is_target_function);
private:
+ llvm::Value* LoadFromObjectOffset(llvm::Value* object_addr, int32_t offset, llvm::Type* type);
+
+ void StoreToObjectOffset(llvm::Value* object_addr, int32_t offset,
+ llvm::Type* type, llvm::Value* value);
+
CompilationUnit* cunit_;
Compiler const* compiler_;
@@ -77,6 +86,9 @@ class JniCompiler {
DexFile const* dex_file_;
Method* method_;
+ llvm::BasicBlock* basic_block_;
+ llvm::AllocaInst* shadow_frame_;
+
llvm::Function* func_;
};