Author: azuroth
Date: Sat Jan  7 08:11:49 2006
New Revision: 10965

Modified:
   trunk/compilers/imcc/main.c
   trunk/compilers/imcc/optimizer.c
Log:
Fixed some optimizer stuff - set_args, set_i_p_ki etc.


Modified: trunk/compilers/imcc/main.c
==============================================================================
--- trunk/compilers/imcc/main.c (original)
+++ trunk/compilers/imcc/main.c Sat Jan  7 08:11:49 2006
@@ -475,8 +475,8 @@ main(int argc, char * argv[])
         IMCC_INFO(interp)->optimizer_level = 0;
 #else
         /* won't even make with this: something with Data::Dumper and 
set_i_p_i*/
-        strcpy(optimizer_opt, "2");
-        IMCC_INFO(interp)->optimizer_level = (OPT_CFG | OPT_PRE);
+        strcpy(optimizer_opt, "1");
+        IMCC_INFO(interp)->optimizer_level = OPT_PRE;
 #endif
     }
 

Modified: trunk/compilers/imcc/optimizer.c
==============================================================================
--- trunk/compilers/imcc/optimizer.c    (original)
+++ trunk/compilers/imcc/optimizer.c    Sat Jan  7 08:11:49 2006
@@ -991,7 +991,7 @@ branch_cond_loop_swap(Interp *interp, IM
             for (start = start->next; start != cond; start = start->next) {
                 if (!(start->type & ITLABEL)) {
                     tmp = INS(interp, unit, start->op, "", 
-                            start->r, start->n_r, 0, 0);
+                            start->r, start->n_r, start->keys, 0);
                     prepend_ins(unit, branch, tmp);
                 }
             }
@@ -1061,6 +1061,10 @@ branch_cond_loop(Interp *interpreter, IM
                     /* no good if it's an unconditional branch*/
                     if (cond->type & IF_goto && !strcmp(cond->op, "branch")) {
                         break;
+                    } else if (cond->type & ITPCCRET || cond->type & ITPCCSUB
+                            || cond->type & ITCALL) {
+                        break;
+                        /* just until we can copy set_args et al */
                     } else if (cond->type & ITBRANCH && get_branch_regno(cond) 
>= 0) {
                         found = 1;
                         break;

Reply via email to