Commit Graph

7 Commits (9e3f75255e0c85b6ec054b4929adfed63c364a53)

Author SHA1 Message Date
Sebastien Bourdeauducq 9e3f75255e update inkwell. Closes #67 2021-12-25 22:17:06 +08:00
pca006132 0902d8adf4 nac3core: fix #84 2021-12-23 15:26:48 +08:00
pca006132 ba08deada6 nac3core: refactor codegen 2021-11-20 19:50:25 +08:00
Sebastien Bourdeauducq bf7e2c295a integrate nac3parser 2021-11-03 17:11:00 +08:00
Sebastien Bourdeauducq bc0f82cad8 Revert "nac3artiq/codegen: fixed smax problem"
We have LLVM 12 now and can use the intrinsic.

This reverts commit 98d9f73afb.
2021-11-02 14:00:28 +08:00
pca006132 98d9f73afb nac3artiq/codegen: fixed smax problem
It turns out the smax intrinsic I use is a new one that is not supported
in LLVM11. Now implemented with signed integer compare and select.
2021-11-02 11:10:21 +08:00
pca006132 84c5201243 with parallel/sequential support
Behavior of parallel and sequential:
Each function call (indirectly, can be inside a sequential block) within a parallel
block will update the end variable to the maximum now_mu in the block.
Each function call directly inside a parallel block will reset the timeline after
execution. A parallel block within a sequential block (or not within any block) will
set the timeline to the max now_mu within the block (and the outer max now_mu will also
be updated).

Implementation: We track the start and end separately.
- If there is a start variable, it indicates that we are directly inside a
parallel block and we have to reset the timeline after every function call.
- If there is a end variable, it indicates that we are (indirectly) inside a
parallel block, and we should update the max end value.

Note: requires testing, it is difficult to inspect the output IR
2021-10-31 17:16:21 +08:00