From 10f82ff2c8c779b5f802f573c2a8b74f36064ae1 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 17 Nov 2015 00:59:09 +0300 Subject: [PATCH] transforms.iodelay_estimator: do not unify indeterminate delays. --- artiq/compiler/transforms/iodelay_estimator.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/artiq/compiler/transforms/iodelay_estimator.py b/artiq/compiler/transforms/iodelay_estimator.py index 733c93e41..9487fde0a 100644 --- a/artiq/compiler/transforms/iodelay_estimator.py +++ b/artiq/compiler/transforms/iodelay_estimator.py @@ -101,6 +101,12 @@ class IODelayEstimator(algorithm.Visitor): self.current_return = old_return self.current_args = old_args + if types.is_indeterminate_delay(delay) and types.is_indeterminate_delay(typ.delay): + # Both delays indeterminate; no point in unifying since that will + # replace the lazy and more specific error with an eager and more generic + # error (unification error of delay(?) with delay(?), which is useless). + return + try: typ.delay.unify(delay) except types.UnificationError as e: