* configure.ac (ENABLE_LOOP): Changed default to "no".
authoredwin <none@none>
Thu, 20 Apr 2006 18:04:18 +0000 (18:04 +0000)
committeredwin <none@none>
Thu, 20 Apr 2006 18:04:18 +0000 (18:04 +0000)
* src/vm/options.h (opt_loops): Only define for ENABLE_LOOP.

* src/vm/options.c (opt_loops): Only define for ENABLE_LOOP.

* src/vm/vm.c (-oloop, -i): Only recognize these options if
enabled with ENABLE_LOOP/ENABLE_INLINING.

* src/vm/jit/allocator/lsra.c (opt_loops): Only use for ENABLE_LOOP.

configure.ac
src/vm/jit/allocator/lsra.c
src/vm/options.c
src/vm/options.h
src/vm/vm.c

index f160c8470497ef9becb8ef57a428375fc42f3e35..115a76931709a607d137ef257273a06c95224a06 100644 (file)
@@ -526,12 +526,12 @@ fi
 dnl check for loop optimization
 AC_MSG_CHECKING(whether loop optimization should be supported)
 AC_ARG_ENABLE([loop],
-              [AS_HELP_STRING(--disable-loop,disable loop optimization [[default=yes]])],
+              [AS_HELP_STRING(--enable-loop,enable loop optimization [[default=no]])],
               [case "${enableval}" in
-                   no) ENABLE_LOOP=no;;
-                   *) ENABLE_LOOP=yes;;
+                   yes) ENABLE_LOOP=yes;;
+                   *) ENABLE_LOOP=no;;
                esac],
-              [ENABLE_LOOP=yes])
+              [ENABLE_LOOP=no])
 AC_MSG_RESULT(${ENABLE_LOOP})
 AM_CONDITIONAL([ENABLE_LOOP], test x"${ENABLE_LOOP}" = "xyes")
 
index 70c445f404e07d43971d770bd2698b07e73fbb68..e8341cc778d414210065d378667a783afc61a77a 100644 (file)
@@ -29,7 +29,7 @@
    Changes: Christian Thalinger
             Edwin Steiner
 
-   $Id: lsra.c 4710 2006-03-30 10:23:11Z twisti $
+   $Id: lsra.c 4796 2006-04-20 18:04:18Z edwin $
 
 */
 
@@ -833,12 +833,14 @@ void lsra_setup(methodinfo *m, codegendata *cd, registerdata *rd, lsradata *ls)
        s4  t;
        methoddesc *md = m->parseddesc;
 
+#if defined(ENABLE_LOOP)
        /* Loop optimization "destroys" the basicblock array */
        /* TODO: work with the basicblock list               */
        if (opt_loops) {
                log_text("lsra not possible with loop optimization\n");
                assert(0);
        }
+#endif /* defined(ENABLE_LOOP) */
 
        /* Setup LSRA Data structures */
 
index 20f8bcfb5d28ae4bb200b601f942aa50705f1470..970d8a49068c3268176a9d90043213a7d43d7e2f 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: options.c 4550 2006-03-01 17:00:33Z twisti $
+   $Id: options.c 4796 2006-04-20 18:04:18Z edwin $
 
 */
 
@@ -103,7 +103,9 @@ bool checkbounds = true;       /* check array bounds                         */
 bool checknull = true;         /* check null pointers                        */
 bool opt_noieee = false;       /* don't implement ieee compliant floats      */
 bool checksync = true;         /* do synchronization                         */
+#if defined(ENABLE_LOOP)
 bool opt_loops = false;        /* optimize array accesses in loops           */
+#endif
 
 bool makeinitializations = true;
 
index b8a9044cb0c9e06ac2ce9724df4e27a71a9d0299..0700f97839b92ce2ad330dbc5d8ead8b17b60e6a 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: options.h 4550 2006-03-01 17:00:33Z twisti $
+   $Id: options.h 4796 2006-04-20 18:04:18Z edwin $
 
 */
 
@@ -114,7 +114,9 @@ extern bool checkbounds;
 extern bool checknull;
 extern bool opt_noieee;
 extern bool checksync;
+#if defined(ENABLE_LOOP)
 extern bool opt_loops;
+#endif
 
 extern bool makeinitializations;
 
index d0e82f2428f655d4acef40d38e436812ba7f5c9b..2158194f10bf5a6ec9008c9d45b54743023baf84 100644 (file)
@@ -164,8 +164,6 @@ enum {
        OPT_SIGNATURE,
        OPT_SHOW,
        OPT_ALL,
-       OPT_OLOOP,
-       OPT_INLINING,
 
        OPT_VERBOSETC,
        OPT_NOVERIFY,
@@ -174,6 +172,10 @@ enum {
 
        /* optimization options */
 
+#if defined(ENABLE_LOOP)
+       OPT_OLOOP,
+#endif
+       
 #if defined(ENABLE_IFCONV)
        OPT_IFCONV,
 #endif
@@ -182,6 +184,10 @@ enum {
        OPT_LSRA,
 #endif
 
+#if defined(ENABLE_INLINING)
+       OPT_INLINING,
+#endif
+
 #if defined(ENABLE_INTRP)
        /* interpreter options */
 
@@ -250,7 +256,9 @@ opt_struct opts[] = {
        { "eager",             false, OPT_EAGER },
        { "sig",               true,  OPT_SIGNATURE },
        { "all",               false, OPT_ALL },
+#if defined(ENABLE_LOOP)
        { "oloop",             false, OPT_OLOOP },
+#endif
 #if defined(ENABLE_IFCONV)
        { "ifconv",            false, OPT_IFCONV },
 #endif
@@ -297,7 +305,9 @@ opt_struct opts[] = {
 
        /* keep these at the end of the list */
 
+#if defined(ENABLE_INLINING)
        { "i",                 true,  OPT_INLINING },
+#endif
        { "m",                 true,  OPT_METHOD },
        { "s",                 true,  OPT_SHOW },
 
@@ -359,7 +369,9 @@ void usage(void)
        puts("    -log logfile             specify a name for the logfile");
        puts("    -c(heck)b(ounds)         don't check array bounds");
        puts("            s(ync)           don't check for synchronization");
-       puts("    -oloop                   optimize array accesses in loops"); 
+#if defined(ENABLE_LOOP)
+       puts("    -oloop                   optimize array accesses in loops");
+#endif
        puts("    -l                       don't start the class after loading");
        puts("    -eager                   perform eager class loading and linking");
        puts("    -all                     compile all methods, no execution");
@@ -373,11 +385,13 @@ void usage(void)
        puts("           m(ethods)         show class fields and methods");
        puts("           n(ative)          show disassembled native stubs");
        puts("           u(tf)             show the utf - hash");
+#if defined(ENABLE_INLINING)
        puts("    -i     n(line)           activate inlining");
        puts("           v(irtual)         inline virtual methods (uses/turns rt option on)");
        puts("           e(exception)      inline methods with exceptions");
        puts("           p(aramopt)        optimize argument renaming");
        puts("           o(utsiders)       inline methods of foreign classes");
+#endif /* defined(ENABLE_INLINING) */
 #if defined(ENABLE_IFCONV)
        puts("    -ifconv                  use if-conversion");
 #endif
@@ -879,10 +893,13 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        }
                        break;
                        
+#if defined(ENABLE_LOOP)
                case OPT_OLOOP:
                        opt_loops = true;
                        break;
+#endif
 
+#if defined(ENABLE_INLINING)
                case OPT_INLINING:
                        for (j = 0; j < strlen(opt_arg); j++) {         
                                switch (opt_arg[j]) {
@@ -908,6 +925,7 @@ bool vm_create(JavaVMInitArgs *vm_args)
                                }
                        }
                        break;
+#endif /* defined(ENABLE_INLINING) */
 
 #if defined(ENABLE_IFCONV)
                case OPT_IFCONV: