示例#1
0
 def force_box(self, op, optforce=None):
     op = self.get_box_replacement(op)
     if optforce is None:
         optforce = self
     info = op.get_forwarded()
     if self.optunroll and self.optunroll.potential_extra_ops:
         # XXX hack
         try:
             preamble_op = self.optunroll.potential_extra_ops.pop(op)
         except KeyError:
             pass
         else:
             sb = self.optunroll.short_preamble_producer
             sb.add_preamble_op(preamble_op)
     if info is not None:
         if op.type == 'i' and info.is_constant():
             return ConstInt(info.getint())
         return info.force_box(op, optforce)
     return op
示例#2
0
 def force_box(self, op, optforce=None):
     op = self.get_box_replacement(op)
     if optforce is None:
         optforce = self
     info = op.get_forwarded()
     if self.optunroll and self.optunroll.potential_extra_ops:
         # XXX hack
         try:
             preamble_op = self.optunroll.potential_extra_ops.pop(op)
         except KeyError:
             pass
         else:
             sb = self.optunroll.short_preamble_producer
             sb.add_preamble_op(preamble_op)
     if info is not None:
         if op.type == 'i' and info.is_constant():
             return ConstInt(info.getint())
         return info.force_box(op, optforce)
     return op