whitequark
ee1b2fa3ea
compiler: swap the order of ptr/len fields in lists.
...
This is to make them match the Rust slices.
Once the cslice crate becomes #![no_std] we'll also use its (tidier)
conversion functions.
2017-01-31 22:11:13 +00:00
whitequark
ab71c9a0ba
compiler: the len builtin is not polymorphic, coerce the result.
...
Fixes #659 .
2017-01-31 21:28:20 +00:00
whitequark
6acdcbb82a
Fix 2f37b1d
.
2017-01-30 10:25:11 +00:00
whitequark
2f37b1d1c0
compiler: support methods defined on singleton instances.
...
Fixes #638 .
2017-01-30 10:10:21 +00:00
whitequark
57f54dbd12
llvm_ir_generator: recognize inline and forceinline flags.
2017-01-25 10:25:00 +00:00
whitequark
f68e4ae519
compiler: rein in overzealous cast monomorphization.
2016-12-05 05:08:57 +00:00
whitequark
218720cfa7
Revert "compiler: rein in overzealous cast monomorphization."
...
This reverts commit 4305903dde
.
This broke the monomorphizer/round.py test.
2016-12-05 05:04:26 +00:00
whitequark
4305903dde
compiler: rein in overzealous cast monomorphization.
...
This caused failures on e.g. "int32(var64a >> var64b)", where
the type of the argument is already fully known, but was unified
with the result of the cast anyway.
2016-12-05 04:38:25 +00:00
whitequark
b5a684830d
compiler: fix parsing of TList annotations ( fixes #632 ).
2016-12-05 03:18:56 +00:00
whitequark
68de724554
compiler: monomorphize int64(round(x)) to not lose precision.
...
This applies to any expression with an indeterminate integer type
cast to int64(), not just round().
2016-12-02 15:02:44 +00:00
whitequark
ac997daf95
compiler: disable remarks.
2016-11-21 19:12:11 +00:00
whitequark
55ea68da7f
compiler: unbreak casts to int32/int64.
2016-11-21 14:20:28 +00:00
whitequark
53b7d59b6a
analyses.constness: fix false positive on x[...].
2016-11-21 14:20:26 +00:00
whitequark
35f4449ef2
inferencer: significantly improve the op-assignment diagnostic.
...
Before this commit, it displayed incorrect output if an error
appeared on 2nd run and beyond, and displayed messages for trying
to do "num32 -= num64" that made very little sense.
2016-11-21 14:20:24 +00:00
whitequark
009d396740
Move mu_to_seconds, seconds_to_mu to Core.
2016-11-21 05:37:30 +00:00
whitequark
7af41bd29c
llvm_ir_generator: handle no-op coercions.
2016-11-21 02:25:34 +00:00
whitequark
cdb29f9caa
Revert accidentally committed code.
2016-11-20 14:32:59 +00:00
whitequark
f5cca6b09e
analyses.invariant_detection: implement ( #622 ).
2016-11-20 12:48:26 +00:00
whitequark
d3ee858d16
llvm_ir_generator: use !{→unconditionally.}invariant.load metadata.
...
This helps LICM, among other things.
2016-11-12 04:08:58 +00:00
whitequark
0e76cbc414
artiq_compile: actually disable attribute writeback.
...
I wrote both halves of this condition but forgot to hook
them together.
Fixes #586 .
2016-11-10 01:04:36 +00:00
David Nadlinger
bfbdba9205
compiler: Emit all-kernel_invariant objects as LLVM constants
...
This enables constant propagation optimisations, as verified by
the included test case. This is only a first stop-gap measure, though;
we should support optimisation based on kernel invariants on a more
fine-grained level.
2016-11-09 14:50:48 +00:00
whitequark
ec8fe6f8bd
Revert "Revert "Revert "Revert "Update for LLVM 3.9.""""
...
This reverts commit 7b81ed1d18
.
2016-11-08 14:22:47 +00:00
whitequark
7b81ed1d18
Revert "Revert "Revert "Update for LLVM 3.9."""
...
This reverts commit 0d7688017b
.
2016-11-08 12:58:20 +00:00
whitequark
0d7688017b
Revert "Revert "Update for LLVM 3.9.""
...
This reverts commit 5f5975844a
.
2016-11-08 11:59:16 +00:00
whitequark
798a5f70df
Revert "runtime: remove some redundant libm functions copied inline."
...
This reverts commit fee75bd50f
.
LLVM does not have lround as a libcall and this inhibits LICM.
2016-11-08 11:54:17 +00:00
David Nadlinger
6e77f65d50
compiler: Clarify recv_rpc value names and documentation [nfc]
...
Previously, the phi emitted for the pointer parameter to recv_rpc was –
rather confusingly – called "size", and the pseudo-code in the comment
had bit-rotted.
Signed-off-by: David Nadlinger <code@klickverbot.at>
2016-11-07 14:38:21 +00:00
David Nadlinger
7dcc987dd7
compiler: Fix break/continue targets in loop else blocks
...
Previously, they would still target the respective labels in the
just-exited loop.
Signed-off-by: David Nadlinger <code@klickverbot.at>
2016-11-05 02:35:01 +00:00
whitequark
cd68577dbc
compiler: add support for async RPCs.
2016-10-30 00:57:31 +00:00
whitequark
2a9e370840
llvm_ir_generator: make sure RPC allocations are not underaligned.
2016-10-16 16:43:03 +00:00
whitequark
7618907cad
runtime: use i64 for watchdog timeout, not i32.
2016-10-16 16:32:43 +00:00
whitequark
a8c017bfcc
runtime: port ksupport to Rust.
2016-10-16 16:32:43 +00:00
whitequark
fee75bd50f
runtime: remove some redundant libm functions copied inline.
2016-10-16 16:25:29 +00:00
whitequark
1cbb187136
runtime: eliminate va_list from kernel interface.
2016-09-30 03:07:27 +00:00
whitequark
ed60ba8c4c
compiler: skip kernel_invariant linting for exception types.
2016-09-14 23:34:57 +00:00
whitequark
feeb089505
compiler: warn about unused kernel_invariant entries.
...
Fixes #543 .
2016-09-14 23:28:55 +00:00
Sebastien Bourdeauducq
c414026b29
import_cache: make sure last line ends with \n as linecache does. Closes #547
2016-09-02 11:01:28 +08:00
whitequark
f26f446724
artiq_run: unbreak
2016-08-17 10:20:04 +00:00
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
Sebastien Bourdeauducq
84f4725015
cache source on import of modules that may contain kernels. Closes #416
2016-08-06 12:01:49 +08:00
whitequark
21bc285604
transforms.llvm_ir_generator: skip RPC values for attribute writeback.
2016-08-03 04:59:14 +00:00
whitequark
c50d436f0b
ir: `invoke` is a valid `delay` decomposition.
...
Fixes #510 .
2016-07-13 08:48:31 +00:00
whitequark
c5ba44b8a6
compiler.testbench.perf_embedding: more fine grained reporting.
2016-07-11 17:55:24 +00:00
whitequark
c4dc4e7bf5
compiler.testbench.perf_embedding: update for core changes.
2016-07-08 10:48:41 +00:00
whitequark
5a79fcf9ba
embedding: reimplement 373578bc
properly.
...
The core of the problem that 373578bc
was attempting to solve is
that diagnostics sometimes should be chained; one way of chaining
is the loc.expanded_from feature, which handles macro-like expansion,
but another is providing context.
Before this commit, context was provided using an ad-hoc override
of a diagnostic engine, which did not work in cases where diagnostic
engine was not threaded through the call stack. This commit uses
the newly added pythonparser context feature to elegantly handle
the problem.
2016-07-07 11:49:21 +00:00
whitequark
373578bc02
embedding: fix location for diagnostics on quoted values.
...
Fixes #489 .
2016-07-07 08:32:56 +00:00
whitequark
d90fd7dc00
compiler: implement numpy.full ( #424 ).
2016-07-07 06:33:38 +00:00
whitequark
7a671fb2fd
embedding: treat numpy.{int32,int64,array} specially ( #424 ).
...
Also, remove them from prelude to not pollute the namespace.
2016-07-07 06:33:38 +00:00