* src/vm/jit/jit.c (jit_compile_intern): Fixed error in preprocessor flags logic.
[cacao.git] / src / vm / jit / jit.c
index 45bea30c9d16df90e7e0878ac8f9a3c8a66db9b3..971a9dd752b937a6d9554b44dbd5b81d24d0bcc1 100644 (file)
@@ -701,18 +701,6 @@ static u1 *jit_compile_intern(jitdata *jd)
 #endif
                RT_TIMING_GET_TIME(time_typecheck);
 
-#if defined(ENABLE_SSA)
-               if (opt_lsra) {
-                       fix_exception_handlers(jd);
-               }
-#endif
-
-               /* Build the CFG.  This has to be done after stack_analyse, as
-                  there happens the JSR elimination. */
-
-               if (!cfg_build(jd))
-                       return NULL;
-
 #if defined(ENABLE_LOOP)
                if (opt_loops) {
                        depthFirst(jd);
@@ -734,13 +722,25 @@ static u1 *jit_compile_intern(jitdata *jd)
 
                /* inlining */
 
-#if defined(ENABLE_INLINING) && !defined(ENABLE_ESCAPE)
+#if defined(ENABLE_INLINING) && (!defined(ENABLE_ESCAPE) || 1)
                if (JITDATA_HAS_FLAG_INLINE(jd)) {
                        if (!inline_inline(jd))
                                return NULL;
                }
 #endif
 
+#if defined(ENABLE_SSA)
+               if (opt_lsra) {
+                       fix_exception_handlers(jd);
+               }
+#endif
+
+               /* Build the CFG.  This has to be done after stack_analyse, as
+                  there happens the JSR elimination. */
+
+               if (!cfg_build(jd))
+                       return NULL;
+
 #if defined(ENABLE_PROFILING)
                /* Basic block reordering.  I think this should be done after
                   if-conversion, as we could lose the ability to do the
@@ -771,8 +771,9 @@ static u1 *jit_compile_intern(jitdata *jd)
 #if defined(ENABLE_SSA)
                /* allocate registers */
                if (
-                       (opt_lsra) 
-                       /*&& strncmp(jd->m->name->text, "banana", 6) == 0*/
+                       (opt_lsra &&
+                       jd->code->optlevel > 0) 
+                       /* strncmp(jd->m->name->text, "hottie", 6) == 0*/
                        /*&& jd->exceptiontablelength == 0*/
                ) {
                        /*printf("=== %s ===\n", jd->m->name->text);*/