X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fmini-llvm-cpp.h;h=ee502e29d09f31ed11bfdd2d5b910871d471e1f0;hb=ba1a8099800613589a62c8e9c2c9d8c534886d79;hp=d021848e374f94ea1ca3a04b41913430dc46bd69;hpb=e0499543af5ed59464cfc0b63f77428220816886;p=mono.git diff --git a/mono/mini/mini-llvm-cpp.h b/mono/mini/mini-llvm-cpp.h index d021848e374..ee502e29d09 100644 --- a/mono/mini/mini-llvm-cpp.h +++ b/mono/mini/mini-llvm-cpp.h @@ -17,6 +17,16 @@ G_BEGIN_DECLS +/* + * Keep in sync with the enum in utils/mono-memory-model.h. + */ +typedef enum { + LLVM_BARRIER_NONE = 0, + LLVM_BARRIER_ACQ = 1, + LLVM_BARRIER_REL = 2, + LLVM_BARRIER_SEQ = 3, +} BarrierKind; + typedef enum { LLVM_ATOMICRMW_OP_XCHG = 0, LLVM_ATOMICRMW_OP_ADD = 1, @@ -27,14 +37,16 @@ typedef void (FunctionEmittedCb) (LLVMValueRef function, void *start, void *end) typedef void (ExceptionTableCb) (void *data); typedef char* (DlSymCb) (const char *name, void **symbol); -LLVMExecutionEngineRef -mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, FunctionEmittedCb *emitted_cb, ExceptionTableCb *exception_cb, DlSymCb *dlsym_cb); +typedef void* MonoEERef; + +MonoEERef +mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, FunctionEmittedCb *emitted_cb, ExceptionTableCb *exception_cb, DlSymCb *dlsym_cb, LLVMExecutionEngineRef *ee); void -mono_llvm_dispose_ee (LLVMExecutionEngineRef ee); +mono_llvm_dispose_ee (MonoEERef *mono_ee); void -mono_llvm_optimize_method (LLVMValueRef method); +mono_llvm_optimize_method (MonoEERef mono_ee, LLVMValueRef method); void mono_llvm_dump_value (LLVMValueRef value); @@ -46,7 +58,7 @@ mono_llvm_build_alloca (LLVMBuilderRef builder, LLVMTypeRef Ty, LLVMValueRef mono_llvm_build_load (LLVMBuilderRef builder, LLVMValueRef PointerVal, - const char *Name, gboolean is_volatile); + const char *Name, gboolean is_volatile, BarrierKind barrier); LLVMValueRef mono_llvm_build_aligned_load (LLVMBuilderRef builder, LLVMValueRef PointerVal, @@ -54,7 +66,7 @@ mono_llvm_build_aligned_load (LLVMBuilderRef builder, LLVMValueRef PointerVal, LLVMValueRef mono_llvm_build_store (LLVMBuilderRef builder, LLVMValueRef Val, LLVMValueRef PointerVal, - gboolean is_volatile); + gboolean is_volatile, BarrierKind kind); LLVMValueRef mono_llvm_build_aligned_store (LLVMBuilderRef builder, LLVMValueRef Val, LLVMValueRef PointerVal, @@ -64,7 +76,7 @@ LLVMValueRef mono_llvm_build_atomic_rmw (LLVMBuilderRef builder, AtomicRMWOp op, LLVMValueRef ptr, LLVMValueRef val); LLVMValueRef -mono_llvm_build_fence (LLVMBuilderRef builder); +mono_llvm_build_fence (LLVMBuilderRef builder, BarrierKind kind); void mono_llvm_replace_uses_of (LLVMValueRef var, LLVMValueRef v);