artiq/lit-test/test
whitequark 50e7b44d04 compiler: actually implement interleaving correctly (calls are still broken).
The previous implementation was completely wrong: it always advanced
the global timeline by the same amount as the non-interleaved basic
block did.

The new implementation only advances the global timeline by
the difference between its current time and the virtual time of
the branch, which requires it to adjust the delay instructions.

Previously, the delay expression was present in the IR twice: once
as the iodelay.Expr transformation-visible form, and once as regular
IR instructions, with the latter form being passed to the delay_mu
builtin and advancing the runtime timeline.

As a result of this change, this strategy is no longer valid:
we can meaningfully mutate the iodelay.Expr form but not the IR
instruction form. Thus, IR instructions are no longer generated for
delay expressions, and the LLVM lowering pass now has to lower
the iodelay.Expr objects as well.

This works OK for flat `with parallel:` expressions, but breaks down
outside of `with parallel:` or when calls are present. The reasons
it breaks down are as follows:

  * Outside of `with parallel:`, delay() and delay_mu() must accept
    any expression, but iodelay.Expr's are not nearly expressive
    enough. So, the IR instruction form must actually be kept as well.

  * A delay instruction is currently inserted after a call to
    a user-defined function; this delay instruction introduces
    a point where basic block reordering is possible as well as
    provides delay information. However, the callee knows nothing
    about the context in which it is called, which means that
    the runtime timeline is advanced twice. So, a new terminator
    instruction must be added that combines the properties of delay
    and call instructions (and another for delay and invoke as well).
2015-11-21 00:02:47 +08:00
..
codegen Rename artiq.compiler.testbench.{module → signature}. 2015-07-29 14:32:34 +03:00
devirtualization Merge branch 'master' into new-py2llvm 2015-10-13 19:24:45 +03:00
embedding Merge branch 'master' into new-py2llvm 2015-10-14 16:09:57 +03:00
exceptions On uncaught exception, execute finally clauses and collect backtrace. 2015-07-27 13:51:24 +03:00
inferencer lit-test: fix inferencer/error_class test (broken in b0c6b70). 2015-11-19 23:28:00 +08:00
integration ARTIQIRGenerator: fix non-nullary method calls. 2015-08-28 02:11:05 -05:00
interleaving compiler: actually implement interleaving correctly (calls are still broken). 2015-11-21 00:02:47 +08:00
iodelay transforms.iodelay_estimator: fail statements with indeterminate delay inside `with parallel`. 2015-11-20 17:10:25 +08:00
local_access LocalAccessValidator: relax restrictions to accept def f(); def g(). 2015-08-22 13:31:09 -07:00
monomorphism Rename artiq.compiler.testbench.{module → signature}. 2015-07-29 14:32:34 +03:00
time Implement {delay,now,at}{,_mu} and {mu,seconds}_to_{seconds,mu}. 2015-08-31 09:59:33 -06:00
lit.cfg Fix tests. 2015-11-07 15:17:31 +03:00