Commit Graph

425 Commits

Author SHA1 Message Date
whitequark 26117e8d93 transforms.inferencer: allow variable as type of `n` in `[]*n`.
Fixes #473.
2016-06-16 13:35:00 +00:00
whitequark e47538ca33 analyzer: explicitly delimit messages (with \x1D).
Fixes #461.
2016-06-07 11:26:49 +00:00
whitequark 355af3e569 embedding: specialize inherited functions.
Fixes #414.
2016-05-16 15:59:26 +00:00
whitequark 640022122b embedding: refactor some more. 2016-05-16 14:38:09 +00:00
whitequark 0826ceb8ba Commit missing parts of a5bb4a24. 2016-05-10 02:12:57 +00:00
whitequark a5bb4a24af compiler: support short form of raise.
Fixes #240.
2016-05-10 01:41:40 +00:00
whitequark 6d29e768a5 Commit missing parts of 4e5d75295. 2016-05-09 12:51:24 +00:00
whitequark 4e5d752951 compiler: fix quoting of methods (fixes #423). 2016-05-09 12:25:57 +00:00
whitequark a88425b66b compiler: allow RPCing builtin functions.
Fixes #366.
2016-04-26 01:31:17 +00:00
whitequark 1464bae6b7 compiler: don't typecheck RPCs except for return type.
Fixes #260.
2016-04-26 01:12:36 +00:00
whitequark 8b1c5e3a26 llvm_ir_generator: add fast-math flags to fcmp.
This is allowed in 3.8.
2016-04-05 00:48:41 +00:00
whitequark ad83b092fa llvm_ir_generator: change !{→unconditionally_}dereferenceable.
Since LLVM 3.8, !dereferenceable is weaker, so we introduce
!unconditionally_dereferenceable (http://reviews.llvm.org/D18738)
to regain its functionality.
2016-04-05 00:48:41 +00:00
whitequark 72b952e850 llvm_ir_generator: fix DICompileUnit.language. 2016-04-05 00:48:41 +00:00
whitequark a57aabb3ea compiler: purge generated functions from backtraces. 2016-04-02 18:29:36 +00:00
whitequark a1e98a4437 llvm_ir_generator: add TBAA metadata for @now. 2016-04-02 18:19:14 +00:00
whitequark b1f371e578 llvm_ir_generator: update debug info emission for LLVM 3.8. 2016-04-02 18:05:40 +00:00
whitequark 10108e6d64 compiler: mark loaded pointers as !dereferenceable.
Also, lower the bound for test_pulse_rate_dds, since we generate
better code for it now.
2016-03-31 12:04:38 +00:00
whitequark 2c04979727 compiler: update for LLVM 3.7. 2016-03-31 11:23:47 +00:00
whitequark 8a908a7656 llvm_ir_generator: do not use 'coldcc' calling convention.
First, this calling convention doesn't actually exist in OR1K
and trying to use it in Asserts build causes an UNREACHABLE.

Second, I tried to introduce it and it does not appear to produce
any measurable benefit: not only OR1K has a ton of CSRs but also
it is quite hard, if not realistically impossible, to produce
the kind of register pressure that would be relieved by sparing
a few more CSRs for our exception raising function calls, since
temporaries don't have to be preserved before a noreturn call
and spilling over ten registers across an exceptional edge
is not something that the code we care about would do.

Third, it produces measurable drawbacks: it inflates code size
of check:* functions by adding spills. Of course, this could be
alleviated by making __artiq_raise coldcc as well, but what's
the point anyway?
2016-03-29 15:19:46 +00:00
whitequark 586022023b llvm_ir_generator: mark loads as non-null where applicable. 2016-03-29 13:34:37 +00:00
whitequark a9489246a4 llvm_ir_generator: don't mark non-constant attribute loads as invariant.
Oops.
2016-03-29 13:03:49 +00:00
whitequark 3ed852e077 Commit missing parts of 1d8b0d46. 2016-03-28 21:44:31 +00:00
whitequark 1038f1321f compiler: allow specifying per-function "fast-math" flags.
Fixes #351.
2016-03-28 21:44:08 +00:00
whitequark 6f5332f892 compiler: allow flagging syscalls, providing information to optimizer.
This also fixes a crash in test_cache introduced in 1d8b0d46.
2016-03-28 19:56:56 +00:00
whitequark 1d8b0d46bc compiler: mark FFI functions as ModRef=Ref using TBAA metadata.
Fascinatingly, the fact that you can mark call instructions with
!tbaa metadata is completely undocumented. Regardless, it is true:
a !tbaa metadata for an "immutable" type will cause
AliasAnalysis::getModRefBehavior to return OnlyReadsMemory for that
call site.

Don't bother marking loads with TBAA yet since we already place
!load.invariant on them (which is as good as the TBAA "immutable"
flag) and after that we're limited by lack of !nonnull anyway.

Also, add TBAA analysis passes in our pipeline to actually engage it.
2016-03-28 02:52:15 +00:00
whitequark 418f0a5234 compiler: mark loads of kernel constant attributes as load invariant.
Also, enable LICM, since it can take advantage of this.
2016-03-28 00:44:32 +00:00
whitequark ca7463a054 compiler: do not write back kernel constant attributes.
Fixes #322.
2016-03-28 00:05:57 +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 20ad7629ac llvm_ir_generator: generate code more amenable to LLVM's GlobalOpt.
This exposes almost all embedded methods to inlining, with massive
gains.
2016-03-26 21:35:48 +00:00
whitequark 186a564ba8 compiler: make quoted functions independent of outer environment. 2016-03-26 20:46:45 +00:00
whitequark 3ee9834197 compiler: significantly increase readability of LLVM and ARTIQ IRs. 2016-03-26 12:21:02 +00:00
whitequark 8d0566661a compiler: quote functions directly instead of going through a local. 2016-03-25 22:35:55 +00:00
whitequark 39d23793a4 transforms.llvm_ir_generator: extract class function attributes.
This should give LLVM more visibility.
2016-03-25 19:01:39 +00:00
whitequark 39599d4508 compiler: get rid of the GetConstructor opcode. 2016-03-25 19:01:39 +00:00
whitequark f4ab507ab2 Bring back target print function. 2016-03-18 04:42:06 +00:00
whitequark 82ab21dbd5 transforms.inferencer: better message for BinOpT unification.
Fixes #311.
2016-03-18 01:22:01 +00:00
whitequark 7e16da4a77 transforms.llvm_ir_generator: ignore assignments of None (fixes #309). 2016-03-01 12:26:42 +00:00
whitequark dc70029b91 transforms.asttyped_rewriter: set loc for ForT (fixes #302). 2016-03-01 05:22:12 +00:00
whitequark 82a8e819ac transforms.llvm_ir_generator: use private linkage instead of internal.
This reduces the size of symbol tables (internal adds an STB_LOCAL
symbol, but private doesn't).
2016-02-25 20:15:40 +00:00
whitequark a1dd909bc4 Take alignment into account during attribute writeback (fixes #293). 2016-02-25 01:44:05 +00:00
whitequark bc81be1345 Implement dumb 'with parallel' (#265). 2016-02-22 13:51:08 +00:00
whitequark 51a5910002 Rename 'with parallel' to 'with interleave' (#265). 2016-02-22 13:24:43 +00:00
whitequark 1465fe6f81 Add channel name as the first argument to rtio_log (#206). 2016-02-15 21:17:54 +00:00
whitequark 74a75841f6 Add rtio_log() and make print() an RPC (#206). 2016-02-15 03:56:56 +00:00
whitequark 0acc86b3b3 transforms.iodelay_estimator: make diagnostics much more clear. 2016-01-27 02:10:15 +00:00
whitequark 3573a8750a transforms.inferencer: give a suggestion on "raise Exception". 2016-01-20 03:20:25 +00:00
whitequark cc22837627 transforms.inferencer: infer a monomorphic type for slice ":" 2016-01-16 03:09:03 +00:00
whitequark 85222783ee transforms.llvm_ir_generator: fix memoize(). 2016-01-16 00:38:57 +00:00
whitequark bed62349d2 transforms.llvm_ir_generator: i64 doesn't need sret (fixes #228). 2016-01-15 23:58:11 +00:00
whitequark 63f7899f93 Commit missing parts of 7f914a0. 2016-01-10 20:25:58 +00:00
whitequark 1be9e7576d transforms.llvm_ir_generator: use byval for FFI calls where appropriate. 2016-01-10 18:31:35 +00:00
whitequark d436093317 transforms.llvm_ir_generator: use sret attribute on FFI calls too. 2016-01-10 17:42:40 +00:00
whitequark 7f914a057c transforms.llvm_ir_generator: use sret attribute. 2016-01-10 17:31:59 +00:00
whitequark edb7423a4f transforms.llvm_ir_generator: use getelementptr inbounds. 2016-01-10 16:36:04 +00:00
whitequark f92ce291ef transforms.llvm_ir_generator: call devirtualized functions directly. 2016-01-10 15:54:46 +00:00
whitequark c46fccdf4b transforms.llvm_ir_generator: annotate invariant loads as such. 2016-01-10 15:45:34 +00:00
whitequark b298170973 transforms.artiq_ir_generator: annotate embedded functions as internal. 2016-01-10 15:45:20 +00:00
whitequark f2f1deb9db transforms.llvm_ir_generator: quote recrusive objects correctly (fixes #213). 2016-01-07 19:52:31 +00:00
whitequark e8bba0a7d6 Commit missing parts of 6a6d7d. 2016-01-05 04:21:46 +00:00
whitequark 6a6d7dab19 transforms.artiq_ir_generator: add support for user-defined context managers. 2016-01-05 04:10:40 +00:00
whitequark dfbf55fed2 transforms/inferencer: add support for user-defined context manager. 2016-01-05 00:11:03 +08:00
whitequark 5baf18ba0d transforms.inferencer: factor out _unify_attribute. 2016-01-04 22:13:05 +08:00
whitequark 05fa80818a transforms.inferencer: make sure parallel/sequential is lone manager. 2016-01-04 21:26:03 +08:00
whitequark 3aa5acbaf3 transforms.llvm_ir_generator: don't crash if embedding is not enabled. 2016-01-03 19:07:11 +08:00
whitequark 81427af506 Remove selective attribute writeback; always synchronize all attributes.
The reasons are:
  1. Shadow memory manipulation added ~12 instructions to TTLOut.pulse
     (without inlining), and it's already barely fast enough.
  2. More importantly, code such as self.ts[1] did not trigger
     attribute writeback, and there seems to be no easy way to fix
     that.
2016-01-03 04:57:58 +08:00
whitequark 38a99fde52 Implement selective attribute writeback using shadow memory. 2016-01-02 22:51:04 +08:00
whitequark 2e33084a5f transforms.llvm_ir_generator: implement instrumentation for attribute writeback. 2016-01-02 06:51:30 +08:00
whitequark 5f68cc6a21 transforms.artiq_ir_generator: handle `raise` in `except:` with `finally:`. 2016-01-02 06:51:29 +08:00
whitequark 693a364d85 transforms.artiq_ir_generator: fix typo. 2015-12-31 22:39:33 +08:00
whitequark ff0ab736e9 Commit missing parts of 8aa34ee9. 2015-12-31 22:36:25 +08:00
whitequark 79d020dd3a transforms.artiq_ir_generator: handle terminated try body. 2015-12-31 22:36:25 +08:00
whitequark 8aa34ee952 compiler: don't require exceptions to inherit ARTIQException. 2015-12-31 21:54:54 +08:00
whitequark 0b69e488e6 transforms.llvm_ir_generator: compare exn typeinfo using strcmp.
This is necessary to correctly catch exceptions from RPCs.
2015-12-31 19:53:28 +08:00
whitequark 9ed6b54249 transforms.cfg_simplifier: remove.
Specifically, the following idiom broke our CFGSimplifier:

b1:
  branch_if %cond, %b2, %b3
b2:
  branch %b3
b3:
  %v = phi [ %b2 => 0, %b3 => 1 ]

This is very annoying to properly handle in general case, and also
this (specifically %b2) is exactly what broke LocalAccessValidator
in the first place. So, remove CFGSimplifier altogether.

Instead, teach LocalAccessValidator how to look through predecessors
in order to get a location.
2015-12-31 17:07:36 +08:00
whitequark 787a1d34fe transforms.llvm_ir_generator: don't crash when quoting over than one list. 2015-12-30 16:22:26 +08:00
whitequark 72b6cca9c3 transforms.cfg_simplifier: correctly update phis. 2015-12-30 16:07:14 +08:00
whitequark ac3a170c8f transforms.llvm_ir_generator: don't crash when quoting empty lists. 2015-12-30 15:47:57 +08:00
whitequark 5dcf936f4e transforms.inferencer: don't crash on partially-inferred binary expressions. 2015-12-30 15:46:54 +08:00
whitequark 78fb3e1b7b compiler: validate local accesses after interleaving. 2015-12-30 15:26:30 +08:00
whitequark df91500f68 Fix ff3206be. 2015-12-30 15:16:05 +08:00
whitequark 14484216ec transforms.cfg_simplifier: handle phi and branch_if properly. 2015-12-30 12:10:28 +08:00
whitequark 8822db089f transforms.cfg_simplifier: implement.
This allows error reporting in LocalAccessValidator to proceed
even when the predecessor is an empty block with only a branch.
2015-12-29 02:15:57 +08:00
whitequark 57ebd57ddb transforms.dead_code_eliminator: update doc. 2015-12-29 02:15:57 +08:00
whitequark b931096ec3 transforms.artiq_ir_generator: fix While codegen (closes #207). 2015-12-26 17:24:05 +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 690b2fd034 transforms.artiq_ir_generator: fix optarg codegen (closes #205). 2015-12-25 12:40:45 +08:00
whitequark 25188f0ca9 transforms.interleaver: correctly handle degenerate `with parallel:` blocks. 2015-12-21 21:32:48 +08:00
whitequark f957be4e6f transforms.llvm_ir_generator: handle loop instruction (fixes #202). 2015-12-21 21:12:17 +08:00
whitequark e4615e7b37 transforms.int_monomorphizer: visit children of CallT. 2015-12-20 18:07:31 +08:00
whitequark 54aeb5030d transforms.int_monomorphizer: also monomorphize round() calls (#198). 2015-12-20 02:36:30 +08:00
whitequark 95af6daa28 transforms.inferencer: accept round(width=n) form (#198). 2015-12-20 01:02:57 +08:00
whitequark 4fcd6abc5e Commit missing parts of 0395efd4. 2015-12-19 06:33:29 +08:00
whitequark 4fb1de33c9 Initial invocation of a @kernel function can now return a value (fixes #197). 2015-12-19 05:26:18 +08:00
whitequark 0395efd479 compiler: give environment types in LLVM IR readable names. 2015-12-18 23:41:51 +08:00
whitequark 7b3ace2e30 transforms.inferencer: fix unsupported decorator diagnostic when embedding.
decorator.loc points to the quoted object with a synthesized location,
and it's not really worth refactoring when we can just point at the @.
2015-12-18 22:58:17 +08:00
whitequark 0755aa38ff transforms.iodelay_estimator: allow goto in zero-iodelay while statements. 2015-12-18 21:14:40 +08:00
whitequark 2759310662 transforms.iodelay_estimator: reject control flow in 'with parallel:' (fixes #195). 2015-12-18 21:02:53 +08:00
whitequark 8cb7844621 transforms.interleaver: unroll loops. 2015-12-17 00:52:22 +08:00
whitequark 5dd1fc993e transforms.dead_code_eliminator: also remove dead instructions. 2015-12-17 00:52:22 +08:00
whitequark 2570932264 transforms.interleaver: don't fail on delay-free loops/conditionals. 2015-12-16 19:26:17 +08:00
whitequark 69cdeaf706 transforms.interleaver: don't fail on degenerate parallel blocks. 2015-12-16 19:26:17 +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 2d906daf7f compiler: implement 'with watchdog' support. 2015-12-10 23:11:00 +08:00
whitequark 4888e897b9 compiler: refactor to use builtins.TInt{32,64}. (NFC) 2015-12-10 23:06:23 +08:00
whitequark c660028abf transforms.llvm_ir_generator: fix reraise inside EH block. 2015-12-10 23:02:32 +08:00
whitequark 3ec9b677b2 Revert "transforms.artiq_ir_generator: treat builtins in 'with' syntactically."
This reverts commit ccc993071b.
2015-12-10 22:25:15 +08:00
whitequark ccc993071b transforms.artiq_ir_generator: treat builtins in 'with' syntactically. 2015-12-10 21:29:16 +08:00
whitequark 22dab0c7cc compiler: clarify confusing comment (NFC). 2015-12-10 20:50:28 +08:00
whitequark 8cb2215edb transforms.inferencer: only instantiate RPC function types, not regular. 2015-12-02 21:48:14 +08:00
whitequark 16ae0fb6eb compiler.embedding: instantiate RPC method types (fixes #180). 2015-11-27 16:29:13 +08:00
whitequark 66b1388a63 transforms.artiq_ir_generator: never put TVars in dicts.
A TVar looks just like whatever it points to, but it does not
compare equal, nor is its hash the same.
2015-11-24 02:59:15 +08:00
whitequark fec5c2ebf0 transforms.interleaver: add a diagnostic for interleave inlining failure. 2015-11-24 02:57:03 +08:00
whitequark 9bc62fa3d2 transforms.iodelay_estimator: correctly handle functions with empty body. 2015-11-24 00:46:26 +08:00
whitequark 32fe4a8a0c transforms.llvm_ir_generator: don't assert on inlined functions. 2015-11-24 00:20:33 +08:00
whitequark 178ff74da2 transforms.interleaver: inline calls. 2015-11-24 00:02:07 +08:00
whitequark 03b4e4027c transforms.interleaver: fix IR type/value mismatch. 2015-11-23 18:53:42 +08:00
whitequark 73845279ae transforms.interleaver: determine when inlining is not necessary. 2015-11-23 18:08:33 +08:00
whitequark a01e328b4a transforms.interleaver: don't assume all delay expressions are folded. 2015-11-21 17:24:00 +08:00
whitequark 82b470891f transforms.interleaver: handle function calls (as atomic so far).
This commit solves issue #2 described in 50e7b44; a function call
is now a valid decomposition for a delay instruction, and this
metadata is propagated when the interleaver converts delays.

However, the interleaver does not yet detect that a called function
is compound, i.e. it is not correct.
2015-11-21 03:34:24 +08:00
whitequark 57dd163d37 transforms.artiq_ir_generator: fix decomposition of explicit delay_mu(). 2015-11-21 03:27:06 +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 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
whitequark 73c358a59a Reformat. 2015-11-20 23:33:06 +08:00
whitequark cc623c13b4 Reformat. 2015-11-20 21:45:34 +08:00
whitequark d0f86e05d0 transforms.interleaver: add safety check. 2015-11-20 17:27:04 +08:00
whitequark 88b7990714 transforms.iodelay_estimator: fail statements with indeterminate delay inside `with parallel`. 2015-11-20 17:10:25 +08:00
whitequark 00ec574d73 transforms.interleaver: implement (without inlining). 2015-11-20 00:03:26 +08:00
whitequark 025bfbe746 transforms.llvm_ir_generator: accept delay instructions.
The delay instruction is just like a branch (discontinuity
in instruction flow), but it also carries metadata: how long
did the execution of its basic block take. This metadata only
matters during inlining and interleaving, so we treat it here
as a mere branch.
2015-11-19 23:55:52 +08:00
whitequark 9639a831bc transforms.artiq_ir_generator: correctly emit IfExpT with control flow.
This can happen with nested if expressions, as well as if
the if expression includes delays.
2015-11-19 23:44:39 +08:00
whitequark 2543daa5cf 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.
2015-11-19 23:24:46 +08:00
whitequark 58db347e01 transforms.iodelay_estimator: fix uninitialized access. 2015-11-19 23:23:39 +08:00
whitequark 48a2bb10d5 transforms.interleaver: add boilerplate. 2015-11-17 05:22:20 +03:00
whitequark de9d7eb2e4 compiler: add `delay` IR instruction. 2015-11-17 05:16:43 +03:00
whitequark e619154c81 transforms.iodelay_estimator: fix handling of `with sequential`. 2015-11-17 01:22:48 +03:00
whitequark 506725f78a transforms.iodelay_estimator: fix handling of methods. 2015-11-17 01:19:22 +03:00
whitequark b0c6b70971 transforms.asttyped_rewriter: fix class redefinition diagnostic. 2015-11-17 01:17:25 +03:00
whitequark 9e0a5b9404 transforms.iodelay_estimator: skip statements, not modules on _UnknownDelay. 2015-11-17 01:00:10 +03:00
whitequark 44d0a35409 transforms.iodelay_estimator: actually iterate to fixpoint. 2015-11-17 00:59:40 +03:00
whitequark 10f82ff2c8 transforms.iodelay_estimator: do not unify indeterminate delays. 2015-11-17 00:59:09 +03:00
whitequark eefa9e2ea6 transforms.inferencer: fix typo. 2015-11-17 00:02:15 +03:00
whitequark b91ffa1b38 ir: fix default argument fiasco. 2015-10-14 17:02:59 +03:00
whitequark 5d64df829e transforms.artiq_ir_generator: fix devirtualized call annotation. 2015-10-14 16:12:00 +03:00
whitequark 32ce33a1f9 transforms.artiq_ir_generator: emit ir.Parallel for with parallel:. 2015-10-09 03:10:39 +03:00
whitequark 48f1f48f09 transforms.artiq_ir_generator: devirtualize method calls. 2015-10-09 02:27:52 +03:00
whitequark 0bb793199f transforms.artiq_ir_generator: devirtualize closure calls. 2015-10-09 01:32:27 +03:00
whitequark 7043b333a7 transforms.devirtualizer → analyses.devirtualization. 2015-10-09 00:29:31 +03:00
whitequark 962dd9de13 transforms.devirtualizer.MethodResolver: implement. 2015-10-07 22:33:08 +03:00
whitequark 6ac82e1439 transforms.devirtualizer.FunctionResolver: implement. 2015-10-07 22:33:00 +03:00
whitequark 42b0089a4c transforms.asttyped_rewriter: simplify. 2015-10-07 22:03:24 +03:00
whitequark 7a6fc3983c Make delay component of function type unifyable. 2015-09-30 18:41:14 +03:00
whitequark 60c985bf0b Remove debug print. 2015-09-27 17:55:19 +03:00
whitequark 867a0689ad transforms.Inferencer: narrow range() element type. 2015-09-02 17:55:48 -06:00
whitequark b971cc8cdf compiler.{iodelay,transforms.iodelay_estimator}: implement. 2015-09-02 17:55:48 -06:00
whitequark 156779007a LLVMIRGenerator: implement quoting of lists. 2015-08-31 23:33:33 -06:00
whitequark 956c1985b1 ARTIQIRGenerator: evaluate SubscriptT index in non-assignment context. 2015-08-31 23:33:04 -06:00
whitequark 3ca5967cea LLVMIRGenerator: don't map sret LLVM argument to any ARTIQ arguments. 2015-08-31 14:02:02 -06:00
whitequark 5e0ec3a6ea ARTIQIRGenerator: fix keyword/optional argument codegen in calls. 2015-08-31 13:42:36 -06:00
whitequark 501ba912c2 Implement {delay,now,at}{,_mu} and {mu,seconds}_to_{seconds,mu}. 2015-08-31 09:59:33 -06:00
whitequark 2124ff9e91 Fix tests. 2015-08-28 05:28:58 -05:00
whitequark 37811f690b ARTIQIRGenerator: support comparisons against None. 2015-08-28 05:14:52 -05:00
whitequark c621b1f275 compiler: handle language.core.int during embedding. 2015-08-28 03:24:15 -05:00
whitequark 83ebb999c8 transforms.Inferencer: improve attribute unification diagnostic. 2015-08-28 03:23:15 -05:00
whitequark 9fd25a1cc4 LLVMIRGenerator: fix syscall emission. 2015-08-28 03:03:12 -05:00
whitequark 9936768603 ARTIQIRGenerator: fix non-nullary method calls. 2015-08-28 02:11:05 -05:00
whitequark c21387dc09 compiler.embedding: support calling methods marked as @kernel. 2015-08-27 19:46:50 -05:00
whitequark 84e32db622 LLVMIRGenerator: handle self-referential class types. 2015-08-27 15:40:46 -05:00
whitequark 71ebe1778d LLVMIRGenerator: remove debug print. 2015-08-27 15:40:15 -05:00
whitequark c62b16d5e1 compiler.embedding: support RPC functions as host attribute values. 2015-08-27 05:53:18 -05:00
whitequark cb225269ff Allow accessing attributes of embedded host objects. 2015-08-27 05:01:04 -05:00
whitequark 9b9fa1ab7c Allow embedding and RPC sending host objects. 2015-08-25 21:56:01 -07:00
whitequark 526d7c4e46 Fix a typo. 2015-08-22 14:01:55 -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 0e26cfb66e LocalAccessValidator: relax restrictions to accept def f(); def g(). 2015-08-22 13:31:09 -07:00
whitequark b39e76ae28 Remove debug print. 2015-08-22 12:22:26 -07:00
whitequark 27a697920a LLVMIRGenerator: use sret when returning large structures. 2015-08-19 15:06:03 -07:00
whitequark afc3f36104 ARTIQIRGenerator: fix polymorphic print on closures. 2015-08-19 12:37:22 -07:00
whitequark 53b4d87647 LLVMIRGenerator: attach debug metadata to all emitted LLVM instructions. 2015-08-19 12:18:20 -07:00
whitequark 51c591f01a Unbreak tests. 2015-08-18 22:44:09 -07:00
whitequark 6c8de9b6d4 Implement methods. 2015-08-18 22:39:22 -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 786fde827a Unbreak tests. 2015-08-11 00:41:31 +03:00
whitequark c72267ecf5 Implement syscalls for the new compiler. 2015-08-10 20:26:06 +03:00
whitequark b28a874274 Inferencer: range() does not accept a float argument. 2015-08-10 17:06:55 +03:00
whitequark f53a5ff202 Remove syscall builtin. 2015-08-10 16:44:29 +03:00
whitequark c63ec70c53 LLVMIRGenerator: emit debug information. 2015-08-10 15:11:52 +03:00
whitequark 8f510a4407 compiler.ir.Function: add loc field. 2015-08-10 13:14:52 +03:00
whitequark 22570afbda LLVMIRGenerator: allocate less. 2015-08-10 09:12:34 +03:00
whitequark dfc91a35f2 ARTIQIRGenerator.polymorphic_print: str([x]) uses repr(x), not str(x). 2015-08-09 20:27:04 +03:00
whitequark f7b64db8f4 LLVMIRGenerator: fixup phis on expansion of ARTIQ instructions. 2015-08-09 20:24:16 +03:00
whitequark d4270cf66e Implement receiving data from RPCs. 2015-08-09 20:17:00 +03:00
whitequark 02b1543c63 Implement receiving exceptions from RPCs. 2015-08-09 16:16:41 +03:00
whitequark 9c5ca2ae29 LLVMIRGenerator: add target data layout to LLVM modules. 2015-08-09 14:39:21 +03:00
whitequark 153592f1cc Naming. 2015-08-09 02:25:58 +03:00
whitequark b26af5df60 Implement sending RPCs. 2015-08-09 02:17:19 +03:00
whitequark 22457bc19c Ensure uwtable is added to all generated functions. 2015-08-08 21:48:21 +03:00
whitequark ee3f35c608 Improve error message on passing an argument twice. 2015-08-08 21:06:13 +03:00
whitequark bdcf7f100b ARTIQIRGenerator: add semantic locs to all other implicitly raised exceptions. 2015-08-08 16:26:53 +03:00
whitequark acd8d6355f transforms.ARTIQIRGenerator: IndexError loc should point to "[". 2015-08-08 16:18:57 +03:00