[svn:parrot] r48822 - trunk/compilers/imcc

plobsing at svn.parrot.org plobsing at svn.parrot.org
Tue Sep 7 18:33:01 UTC 2010


Author: plobsing
Date: Tue Sep  7 18:33:00 2010
New Revision: 48822
URL: https://trac.parrot.org/parrot/changeset/48822

Log:
remove imc_info_t.allocated (was always 0)

Modified:
   trunk/compilers/imcc/imc.h
   trunk/compilers/imcc/instructions.c
   trunk/compilers/imcc/reg_alloc.c

Modified: trunk/compilers/imcc/imc.h
==============================================================================
--- trunk/compilers/imcc/imc.h	Tue Sep  7 18:06:42 2010	(r48821)
+++ trunk/compilers/imcc/imc.h	Tue Sep  7 18:33:00 2010	(r48822)
@@ -562,7 +562,6 @@
     SymHash               ghash;
     jmp_buf               jump_buf;        /* The jump for error  handling */
     int                   IMCC_DEBUG;
-    int                   allocated;
     int                   cnr;
     int                   debug;
     int                   dont_optimize;

Modified: trunk/compilers/imcc/instructions.c
==============================================================================
--- trunk/compilers/imcc/instructions.c	Tue Sep  7 18:06:42 2010	(r48821)
+++ trunk/compilers/imcc/instructions.c	Tue Sep  7 18:33:00 2010	(r48822)
@@ -618,16 +618,6 @@
             snprintf(regb[i], REGB_SIZE, "%c%d", p->set, (int)p->color);
             regstr[i] = regb[i];
         }
-        else if (IMCC_INFO(interp)->allocated
-             && (IMCC_INFO(interp)->optimizer_level & OPT_J)
-             &&  p->set != 'K'
-             &&  p->color < 0
-             && REG_NEEDS_ALLOC(p)) {
-                    snprintf(regb[i], REGB_SIZE,
-                        "r%c%d", tolower((unsigned char)p->set),
-                        -1 -(int)p->color);
-                    regstr[i] = regb[i];
-        }
         else if (p->type & VTREGKEY) {
             const SymReg *k = p;
 
@@ -639,13 +629,6 @@
                 if (k->reg && k->reg->color >= 0)
                     snprintf(regb[i]+used, REGB_SIZE - used, "%c%d",
                             k->reg->set, (int)k->reg->color);
-                else if (IMCC_INFO(interp)->allocated
-                     && (IMCC_INFO(interp)->optimizer_level & OPT_J)
-                     && k->reg
-                     && k->reg->color < 0)
-                        snprintf(regb[i]+used, REGB_SIZE - used, "r%c%d",
-                            tolower((unsigned char)k->reg->set),
-                            -1 -(int)k->reg->color);
                 else
                     strncat(regb[i], k->name, REGB_SIZE - used - 1);
 

Modified: trunk/compilers/imcc/reg_alloc.c
==============================================================================
--- trunk/compilers/imcc/reg_alloc.c	Tue Sep  7 18:06:42 2010	(r48821)
+++ trunk/compilers/imcc/reg_alloc.c	Tue Sep  7 18:33:00 2010	(r48822)
@@ -167,8 +167,6 @@
                 (OPT_PRE|OPT_CFG|OPT_PASM)) && unit->pasm_file)
         goto done;
 
-    IMCC_INFO(interp)->allocated = 0;
-
     if (unit->instructions->symreg_count)
       function = unit->instructions->symregs[0]->name;
     else


More information about the parrot-commits mailing list