forked from M-Labs/artiq
1
0
Fork 0
Commit Graph

288 Commits

Author SHA1 Message Date
whitequark 5f5975844a Revert "Update for LLVM 3.9."
This reverts commit 3aa7b99b8f.
2016-08-13 04:43:19 +00:00
whitequark 3aa7b99b8f Update for LLVM 3.9. 2016-08-13 03:28:04 +00:00
whitequark 1a518ea7eb compiler.embedding: implement string concatenation.
Fixes #526.
2016-08-08 04:05:52 +00:00
whitequark 5a2306ae5a compiler.embedding: implement type annotations for function arguments.
Fixes #318.
2016-08-08 03:28:25 +00:00
whitequark 21bc285604 transforms.llvm_ir_generator: skip RPC values for attribute writeback. 2016-08-03 04:59:14 +00:00
whitequark d90fd7dc00 compiler: implement numpy.full (#424). 2016-07-07 06:33:38 +00:00
whitequark 933ea53c77 compiler: add basic numpy array support (#424). 2016-07-06 09:51:57 +00:00
whitequark 906db876a6 language: replace coredevice int with numpy.{int32,int64}.
Fixes #453.
2016-07-06 04:44:21 +00:00
whitequark fa71b40c80 compiler: print the builtin type int(width=...) as np.int... 2016-07-06 04:22:51 +00:00
whitequark 6155f65366 compiler: remove now()/at().
Fixes #490.
2016-06-28 04:39:14 +00:00
whitequark 33e8e59cc7 compiler: implement min()/max() as builtins.
Fixes #239.
2016-06-22 01:09:41 +00:00
whitequark 77d47c2fdd transforms.artiq_ir_generator: split out finally→reraise control flow.
This makes it accessible to introspect by local access validator,
making some previously rejected code valid.

Fixes #331.
2016-06-22 00:57:32 +00:00
whitequark f2ae24da39 compiler: add support for Python modules.
Fixes #408.
2016-06-21 23:35:07 +00:00
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