2010-07-10 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Fri, 9 Jul 2010 22:48:07 +0000 (22:48 -0000)
committerZoltan Varga <vargaz@gmail.com>
Fri, 9 Jul 2010 22:48:07 +0000 (22:48 -0000)
* mini-llvm.c (set_metadata_flag): Set metadata flags only when using the LLVM
mono branch.

svn path=/trunk/mono/; revision=160177

mono/mini/ChangeLog
mono/mini/mini-llvm.c

index 46a6f076e2d54cf61ae0d016e787a2b7e99b7042..eb572c82b5c484617f9e48f36a4b0e2325d819bd 100755 (executable)
@@ -1,3 +1,8 @@
+2010-07-10  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-llvm.c (set_metadata_flag): Set metadata flags only when using the LLVM
+       mono branch.
+
 2010-07-09  Zoltan Varga  <vargaz@gmail.com>
 
        * mini.h (MONO_INST_HAS_CONSTANT_LOAD): New instruction flag marking loads which load
@@ -13,7 +18,7 @@
 
        * driver.c (mini_usage): Change the name of the --sgen flag to be
        --gc=sgen and also support --gc=boehm.   These flags can also be
-       set on MONO_ENV_OPTIONS to propagate this to children processes. 
+       set on MONO_ENV_OPTIONS to propagate this to children processes.
 
        * main.c: Remove the MONO_VM_OPTIONS environment variable that
        only supported "sgen" and "llvm" config options and instead parse
index 19b03495f47671c9287f64ff449ee83cc0d79132..65ae9b42bbc5241ce2c2d061e2663b3e4f6391c4 100644 (file)
@@ -1079,6 +1079,9 @@ set_metadata_flag (LLVMValueRef v, const char *flag_name)
 #if LLVM_CHECK_VERSION (2, 8)
        LLVMValueRef md_arg;
        int md_kind;
+       
+       if (!IS_LLVM_MONO_BRANCH)
+               return;
 
        md_kind = LLVMGetMDKindID (flag_name, strlen (flag_name));
        md_arg = LLVMMDString ("mono", 4);
@@ -2780,7 +2783,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
 
                        values [ins->dreg] = emit_load (ctx, bb, &builder, size, addr, dname, is_volatile);
 
-                       if (!is_volatile && (ins->flags & MONO_INST_CONSTANT_LOAD) && IS_LLVM_MONO_BRANCH) {
+                       if (!is_volatile && (ins->flags & MONO_INST_CONSTANT_LOAD)) {
                                /*
                                 * These will signal LLVM that these loads do not alias any stores, and
                                 * they can't fail, allowing them to be hoisted out of loops.