Commit Graph

72 Commits

Author SHA1 Message Date
Sebastien Bourdeauducq 404f24af6b compiler: set lld emulation explicitly 2022-11-15 11:20:06 +08:00
David Nadlinger beff15de5e compiler/targets: Fix refactoring leftover for native (host) target
It's unclear whether this actually caused any issues, or why this
wasn't done before (instead just setting the now-removed endianness
flag).
2022-11-14 11:37:45 +08:00
fanmingyu212 56e6b1428c llvm: change addr2line to symbolizer
`llvm-addr2line` is not included as part of the llvm binary package for Windows. This causes ARTIQ python compilations issues when conda is not used (so the `llvm-tools` conda package is not installed, which provides `llvm-addr2line` currently).
2022-10-04 09:35:56 +08:00
occheung 6d46c886d7 ld.lld: translate TARGET2 reloc to relative 2022-05-31 18:26:06 +08:00
pca006132 ba34700798 coredevice: report nested exceptions 2022-01-26 07:16:54 +08:00
occheung 0d708cd61a compiler/target: split RISCV target into float/non-float 2021-11-08 16:59:08 +08:00
Sebastien Bourdeauducq 3ed10221d8 compiler: remove big-endian support. Closes #1590 2021-09-13 13:40:24 +08:00
Sebastien Bourdeauducq e8a7a8f41e compiler: work around idiotic windoze behavior that causes conda ld.lld not to be found 2021-09-13 10:40:54 +08:00
occheung f77b607b56 compiler: generate symbols 2021-09-10 13:25:12 +08:00
Sebastien Bourdeauducq 6629a49e86 compiler: use LLVM binutils/linker for Arm as well
Previously we kept GNU Binutils because they are less of a pain to support
on Windoze - the source of so many problems - but with RISC-V we need to
update LLVM anyway.
2021-09-10 13:25:12 +08:00
Sebastien Bourdeauducq 43d120359d compiler: switch to upstream llvmlite and RISC-V target 2021-09-10 13:25:12 +08:00
pca006132 5b5db1433b Revert "compiler: enabled vectorize option"
This reverts commit 636898c302.
2021-01-11 19:43:12 +08:00
pca006132 636898c302 compiler: enabled vectorize option 2021-01-11 16:31:24 +08:00
David Nadlinger 292043a0a7 compiler: Raise AssertionErrors instead of abort()ing on all targets 2020-11-10 20:40:18 +01:00
David Nadlinger 4f311e7448 compiler: Raise exception on failed assert()s rather than panic
This allows assert() to be used on Zynq, where abort() is not
currently implemented for kernels. Furthermore, this is arguably
the more natural implementation of assertions on all kernel targets
(i.e. where embedding into host Python is used), as it matches host
Python behavior, and the exception information actually makes it to
the user rather than leading to a ConnectionClosed error.

Since this does not implement printing of the subexpressions, I
left the old print+abort implementation as default for the time
being.

The lit/integration/instance.py diff isn't just a spurious change;
the exception-based assert implementation exposes a limitation in
the existing closure lifetime tracking algorithm (which is not
supposed to be what is tested there).

GitHub: Fixes #1539.
2020-11-10 00:51:24 +01:00
pca006132 3bfd372c20 compiler: linker discard local symbols.
Fixes exception backtrace problem for ARM.
2020-08-06 16:07:28 +08:00
Sebastien Bourdeauducq 95807234d9 compiler: use binutils for ARM
This is mostly due to Windoze, where installing anything is a PITA and the LLVM tools won't be available soon.
2020-06-28 17:33:03 +08:00
Sebastien Bourdeauducq 85e92ae28c compiler: use more LLVM tools on ARM (#733) 2020-04-28 16:21:50 +08:00
Sebastien Bourdeauducq 140a26ad7e compiler: ld -> ld.lld 2020-04-28 16:07:26 +08:00
Sebastien Bourdeauducq 4228e0205c compiler: link with lld on ARM (#733) 2020-04-28 15:00:24 +08:00
Sebastien Bourdeauducq 251a0101a6 compiler: support disabling now-pinning 2020-04-26 12:38:43 +08:00
Sebastien Bourdeauducq c03c35f375 Revert "compiler: armv7-unknown-linux-gnueabihf -> armv7-linux-gnueabihf"
rustc insists on -unknown.

This reverts commit cf47fa44d8.
2019-08-26 11:23:00 +08:00
Sebastien Bourdeauducq cf47fa44d8 compiler: armv7-unknown-linux-gnueabihf -> armv7-linux-gnueabihf 2019-08-26 11:12:49 +08:00
Sebastien Bourdeauducq 98cd9a539c compiler: support Cortex A9 target 2019-08-26 10:46:22 +08:00
Sebastien Bourdeauducq 421834fa3e compiler: document Target.little_endian 2018-12-02 19:07:18 +08:00
Sebastien Bourdeauducq 981a77834a compiler: use default triple to determine data_layout for JIT 2018-12-02 18:52:13 +08:00
whitequark dc1c4ebf1d compiler: use ARTIQ_IR_NO_LOC variable to control IR dump output.
Useful e.g. in tests or for running diff on irgen output.
2018-05-19 17:02:08 +00:00
whitequark 917a4185eb Unbreak 9dc7efef. 2018-05-05 03:00:30 +00:00
whitequark 9dc7efefe4 compiler: transparently handle Windows newlines in RunTool. 2018-05-05 01:43:00 +00:00
whitequark 4b5a78e231 compiler: do not pass files to external tools while they are opened.
This fixes access violations on Windows that are present both with
input and output files. For some reason, Cygwin-compiled binutils
did not exhibit this problem, but MSYS-compiled binutils do.

Fixes #961.
2018-03-15 22:21:29 +00:00
whitequark 34a5445802 compiler: don't die if addr2line cannot extract line from backtrace.
Fixes #885.
2018-01-08 21:53:04 +00:00
whitequark de015b994d compiler: allow dumping the object file with ARTIQ_DUMP_OBJ. 2017-02-26 17:09:21 +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 a8c017bfcc runtime: port ksupport to Rust. 2016-10-16 16:32:43 +00: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 c94c411fd5 compiler: demangle symbols.
In future commits we'll add Itanium C++ ABI style mangling to ARTIQ
emitted function names.
2016-05-16 14:38:09 +00:00
whitequark df8018f0be compiler: emit verbose assembly via ARTIQ_DUMP_ASM. 2016-04-01 09:34:51 +00:00
whitequark d9dd7df3b2 compiler: add analysis passes from TargetMachine.
This doesn't have any effect right now, but is the right thing to do.
2016-04-01 09:34:36 +00:00
whitequark b8bd344e54 compiler: use correct data layout. 2016-03-31 11:22:29 +00:00
whitequark f6b391bb4e compiler: fix ARTIQ_DUMP_ELF. 2016-03-29 13:03:49 +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 f81930ffd6 compiler: run IPSCCP.
This doesn't do much, only frees some registers.
2016-03-27 02:00:05 +00:00
whitequark 7213984330 compiler: raise inliner threshold to the equivalent of -O3. 2016-03-27 01:08:13 +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