Changeset 779 for proto/Compiler


Ignore:
Timestamp:
Dec 5, 2010, 9:35:19 AM (9 years ago)
Author:
cameron
Message:

Generate CarryQ_Adjust call at loop end.

Location:
proto/Compiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/compiler2.py

    r777 r779  
    4444        xfrmr.gen_initializations()
    4545        xfrmr.xfrm_block_stmts()     
     46        xfrmr.add_loop_carryQ_adjust()
    4647        # BACK END
    4748        templ = self.read_template(file_path)
  • proto/Compiler/pablo.py

    r777 r779  
    372372    if self.carry_count == 0: return "1"
    373373    else: return "CarryTest(%s, 0, %i);\n" % (self.carry_var, self.carry_count)
    374 
    375374  def gen_declarations(self):
    376375    self.Cdecls = StreamStructGen().gen(self.main_module)
     
    385384    Bitwise_to_SIMD().xfrm(self.main_fn)
    386385    CarryIntro().xfrm_fndef(self.main_fn)
     386  def add_loop_carryQ_adjust(self):
     387    self.main_fn.body += [mkCallStmt('CarryQ_Adjust', [ast.Name(self.carry_var, ast.Load()), ast.Num(self.carry_count)])]
    387388  def getCdecls(self):
    388389    return self.Cdecls
Note: See TracChangeset for help on using the changeset viewer.