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

petdance at svn.parrot.org petdance at svn.parrot.org
Mon Jun 29 06:07:39 UTC 2009


Author: petdance
Date: Mon Jun 29 06:07:39 2009
New Revision: 39821
URL: https://trac.parrot.org/parrot/changeset/39821

Log:
optimize out a call to instruction_reads() if we don't actually need it

Modified:
   trunk/compilers/imcc/reg_alloc.c

Modified: trunk/compilers/imcc/reg_alloc.c
==============================================================================
--- trunk/compilers/imcc/reg_alloc.c	Mon Jun 29 05:59:28 2009	(r39820)
+++ trunk/compilers/imcc/reg_alloc.c	Mon Jun 29 06:07:39 2009	(r39821)
@@ -859,10 +859,9 @@
     r->lhs_use_count = 0;
 
     for (ins = unit->instructions; ins; ins = ins->next) {
-        const int ro = instruction_reads(ins, r);
         const int rw = instruction_writes(ins, r);
 
-        if (ro || rw) {
+        if (rw || instruction_reads(ins, r)) {
             if (!r->first_ins)
                 r->first_ins = ins;
 


More information about the parrot-commits mailing list