Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 48a2bb10d524
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2543daa5cfbb
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 19, 2015

  1. Copy the full SHA
    58db347 View commit details
  2. transforms.artiq_ir_generator: don't emit delay instruction for zero …

    …delay.
    
    Call nodes with iodelay=Const(0) can be generated outside of
    `with parallel:`, where Interleaver won't and LLVMIRGenerator can't
    lower them.
    whitequark committed Nov 19, 2015
    Copy the full SHA
    2543daa View commit details
Showing with 4 additions and 2 deletions.
  1. +2 −2 artiq/compiler/transforms/artiq_ir_generator.py
  2. +2 −0 artiq/compiler/transforms/iodelay_estimator.py
4 changes: 2 additions & 2 deletions artiq/compiler/transforms/artiq_ir_generator.py
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

from collections import OrderedDict, defaultdict
from pythonparser import algorithm, diagnostic, ast
from .. import types, builtins, asttyped, ir
from .. import types, builtins, asttyped, ir, iodelay

def _readable_name(insn):
if isinstance(insn, ir.Constant):
@@ -1619,7 +1619,7 @@ def visit_CallT(self, node):
attr_node = node.func
self.method_map[(attr_node.value.type, attr_node.attr)].append(insn)

if node.iodelay is not None:
if node.iodelay is not None and not iodelay.is_const(node.iodelay, 0):
after_delay = self.add_block()
self.append(ir.Delay(node.iodelay,
{var_name: self.current_args[var_name]
2 changes: 2 additions & 0 deletions artiq/compiler/transforms/iodelay_estimator.py
Original file line number Diff line number Diff line change
@@ -266,6 +266,8 @@ def abort(notes):
{ arg: self.evaluate(args[arg], abort=abort) for arg in free_vars })
else:
assert False
else:
call_delay = iodelay.Const(0)

self.current_delay += call_delay
node.iodelay = call_delay