[llvm] Disable an optimization in LLVM where we deleted and recomputed the MONO_INST_...
authorZoltan Varga <vargaz@gmail.com>
Tue, 18 Jul 2017 06:21:59 +0000 (02:21 -0400)
committerGitHub <noreply@github.com>
Tue, 18 Jul 2017 06:21:59 +0000 (02:21 -0400)
mono/mini/mini-llvm.c
mono/mini/mini.c

index 81c12dfe7791ff0966b6abe23793d80842b6e167..bdcbd9ca72a02314cc27213ae86e98cc49def13c 100644 (file)
@@ -7113,19 +7113,6 @@ emit_method_inner (EmitContext *ctx)
                }
        }
 
-       /*
-        * The INDIRECT flag added by OP_LDADDR inhibits optimizations, even if the LDADDR
-        * was later optimized away, so clear these flags, and add them back for the still
-        * present OP_LDADDR instructions.
-        */
-       for (i = 0; i < cfg->next_vreg; ++i) {
-               MonoInst *ins;
-
-               ins = get_vreg_to_inst (cfg, i);
-               if (ins && ins != cfg->rgctx_var)
-                       ins->flags &= ~MONO_INST_INDIRECT;
-       }
-
        /*
         * Make a first pass over the code to precreate PHI nodes/set INDIRECT flags.
         */
index 9948d16c14554277b1c313c217a664b2676a4ca5..99f0755dd05679cea2fc4c2f3d52d5b67fd33deb 100644 (file)
@@ -2077,8 +2077,11 @@ mono_compile_create_vars (MonoCompile *cfg)
        if (cfg->verbose_level > 2)
                g_print ("creating locals\n");
 
-       for (i = 0; i < header->num_locals; ++i)
+       for (i = 0; i < header->num_locals; ++i) {
+               if (cfg->verbose_level > 2)
+                       g_print ("\tlocal [%d]: ", i);
                cfg->locals [i] = mono_compile_create_var (cfg, header->locals [i], OP_LOCAL);
+       }
 
        if (cfg->verbose_level > 2)
                g_print ("locals done\n");