Changeset 2699


Ignore:
Timestamp:
Nov 27, 2012, 11:30:04 AM (6 years ago)
Author:
cameron
Message:

Elim countBlockCarrysWithAdv1

Location:
proto/Compiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/CCGO.py

    r2698 r2699  
    144144        return [mkCallStmt(self.CarryGroupAtt('CarryCombine'), [self.CarryGroupAtt('cq', "sub" + self.carryGroupVar), ast.Num(loopIndex), ast.Num(carry_count)])]
    145145    def GenerateStreamFunctionFinalization(self):
    146         carry_count = self.carryInfoSet.countBlockCarrysWithAdv1(0)
     146        carry_count = self.carryInfoSet.carry_count + self.carryInfoSet.adv_1_count
    147147        if carry_count == 0: return []
    148148        else: return [mkCallStmt(self.CarryGroupAtt('CarryQ_Adjust'), [ast.Num(carry_count)])]
  • proto/Compiler/carryInfo.py

    r2692 r2699  
    114114    self.block_visit(whileNode)
    115115
    116   def countBlockCarrysWithAdv1(self, blk):
    117     op_count = self.block_op_count[blk]
    118     if op_count == 0: return 0
    119     carries = 0
    120     for op in range(self.block_first_op[blk], self.block_first_op[blk] + op_count):
    121       if op not in self.advance_amount.keys(): carries += 1
    122       elif self.advance_amount[op] == 1: carries += 1
    123     return carries
    124 
    125 
    126116#
    127117#####################################
Note: See TracChangeset for help on using the changeset viewer.