whitequark
fd8b11532f
compiler, firmware: use Pascal strings everywhere.
...
This removes a large amount of very ugly code, and also simplifies
the compiler and runtime.
2017-02-03 11:53:27 +00:00
whitequark
c50d436f0b
ir: `invoke` is a valid `delay` decomposition.
...
Fixes #510 .
2016-07-13 08:48:31 +00:00
whitequark
1464bae6b7
compiler: don't typecheck RPCs except for return type.
...
Fixes #260 .
2016-04-26 01:12:36 +00:00
whitequark
a57aabb3ea
compiler: purge generated functions from backtraces.
2016-04-02 18:29:36 +00:00
whitequark
1038f1321f
compiler: allow specifying per-function "fast-math" flags.
...
Fixes #351 .
2016-03-28 21:44:08 +00:00
whitequark
e75ad3d1aa
compiler: extract runtime checks into separate cold functions.
...
This reduces register pressure as well as function size, which
favorably affects the inliner.
2016-03-27 01:02:15 +00:00
whitequark
3ee9834197
compiler: significantly increase readability of LLVM and ARTIQ IRs.
2016-03-26 12:21:02 +00:00
whitequark
39599d4508
compiler: get rid of the GetConstructor opcode.
2016-03-25 19:01:39 +00:00
whitequark
51a5910002
Rename 'with parallel' to 'with interleave' ( #265 ).
2016-02-22 13:24:43 +00:00
whitequark
2a474b7166
ir: fix incoming_{blocks,values,value_for_block}.
2015-12-30 16:06:18 +08:00
whitequark
f52d364806
Mollify PEP 0479.
2015-12-30 15:33:30 +08:00
whitequark
082e9e20dd
compiler: do not associate SSA values with iodelay even when inlining.
...
Fixes #201 .
2015-12-25 15:02:33 +08:00
whitequark
33c3b3377e
ir: keep loc when copying.
2015-12-25 14:59:28 +08:00
whitequark
0395efd479
compiler: give environment types in LLVM IR readable names.
2015-12-18 23:41:51 +08:00
whitequark
8cb7844621
transforms.interleaver: unroll loops.
2015-12-17 00:52:22 +08:00
whitequark
f8eaeaa43f
compiler: explicitly represent loops in IR.
2015-12-16 15:33:26 +08:00
whitequark
8751d2ee6c
Delay.{expr→interval}.
2015-12-16 13:57:02 +08:00
whitequark
2a82eb7219
compiler.ir: return dict from Delay.substs, not pair iterable.
2015-11-24 00:01:10 +08:00
whitequark
f3da227e2d
compiler.ir: change argument order for BasicBlock.insert.
2015-11-23 23:59:25 +08:00
whitequark
f0fd6cd0ca
compiler.algorithms.inline: implement.
2015-11-23 23:58:37 +08:00
whitequark
a4525b21cf
compiler.ir: print even blocks without predecessors.
2015-11-23 23:55:12 +08:00
whitequark
d92b3434a0
compiler.ir: print basic blocks in reverse postorder for readability.
2015-11-23 21:44:38 +08:00
whitequark
c73b2c1a78
compiler.ir: fix typo.
2015-11-23 21:21:01 +08:00
whitequark
0bf425eefa
compiler.ir: maintain use lists while mutating instructions.
2015-11-23 19:18:58 +08:00
whitequark
cb3b811fd7
compiler: maintain both the IR and iodelay forms of delay expressions.
...
After this commit, the delay instruction (again) does not generate
any LLVM IR: all heavy lifting is relegated to the delay and delay_mu
intrinsics. When the interleave transform needs to adjust the global
timeline, it synthesizes a delay_mu intrinsnic. This way,
the interleave transformation becomes composable, as the input and
the output IR invariants are the same.
Also, code generation is adjusted so that a basic block is split off
not only after a delay call, but also before one; otherwise, e.g.,
code immediately at the beginning of a `with parallel:` branch
would have no choice but to execute after another branch has already
advanced the timeline.
This takes care of issue #1 described in 50e7b44
and is a step
to solving issue #2 .
2015-11-21 03:22:47 +08:00
whitequark
00ec574d73
transforms.interleaver: implement (without inlining).
2015-11-20 00:03:26 +08:00
whitequark
de9d7eb2e4
compiler: add `delay` IR instruction.
2015-11-17 05:16:43 +03:00
whitequark
fd46690cf5
compiler: make IR dumps vastly more readable.
2015-11-17 00:23:34 +03:00
whitequark
b91ffa1b38
ir: fix default argument fiasco.
2015-10-14 17:02:59 +03:00
whitequark
32ce33a1f9
transforms.artiq_ir_generator: emit ir.Parallel for with parallel:.
2015-10-09 03:10:39 +03:00
whitequark
0bb793199f
transforms.artiq_ir_generator: devirtualize closure calls.
2015-10-09 01:32:27 +03:00
whitequark
2ca84f9fea
Highlight source range in IR dumps using colors.
2015-10-04 02:11:17 +03:00
whitequark
9b9fa1ab7c
Allow embedding and RPC sending host objects.
2015-08-25 21:56:01 -07:00
whitequark
a557445e05
LocalAccessValidator: assume variables with "$" in name are internal.
...
Internal variables are assumed to be scoped correctly
(including not being accessed uninitialized).
This was changed from "." because artiq.compiler.embedding uses
"." in module prefix of function names.
2015-08-22 13:56:17 -07:00
whitequark
94a2d5f5fa
Implement class attribute access through instances.
2015-08-15 11:07:54 -04:00
whitequark
00efc8c636
Implement class definitions and class attribute access.
2015-08-15 09:45:16 -04:00
whitequark
8f510a4407
compiler.ir.Function: add loc field.
2015-08-10 13:14:52 +03:00
whitequark
d7f9af4bb5
Fix accidentally quadratic code in compiler.ir.Function._add_name.
2015-07-29 21:36:31 +03:00
whitequark
e8c107925c
Implement shared object linking.
2015-07-29 20:35:16 +03:00
whitequark
2939d4f0f3
Add tests for finally clause and reraising.
2015-07-27 12:36:21 +03:00
whitequark
90be44c596
Add tests for non-exceptional control flow across finally.
2015-07-27 10:13:22 +03:00
whitequark
7c77dd317a
Implement __artiq_personality.
2015-07-27 09:10:20 +03:00
whitequark
ece52062f2
Implement code generation for exception handling.
2015-07-25 05:37:37 +03:00
whitequark
236d5b886a
Add support for Assert.
2015-07-22 02:58:59 +03:00
whitequark
ec9d40b04f
Add LLVM IR generation for function calls.
2015-07-21 13:45:27 +03:00
whitequark
6f11fa6bb1
Add conversion to LLVM IR (except handling of exception handling).
2015-07-21 04:55:01 +03:00
whitequark
c6cd318f19
Fix artiq.compiler.ir.BasicBlock.__repr__.
2015-07-19 16:32:33 +03:00
whitequark
2c010b10ee
Remove UnaryOp ARTIQ IR instruction; rename BinaryOp to Arith.
...
Everything it can express can also be expressed via Arith.
2015-07-19 11:51:53 +03:00
whitequark
ac491fae47
Add LocalAccessValidator.
2015-07-19 11:44:51 +03:00
whitequark
f212ec0263
Add a trivial dead code elimination transform.
...
Its purpose is to sweep up basic blocks with no predecessors,
which are annoying to handle explicitly elsewhere.
2015-07-19 10:29:14 +03:00