mlugg
b355893438
compiler: correct unnecessary uses of 'var'
2023-11-19 11:11:49 +00:00
Jacob Young
ae8992629c
BitcodeReader: followup cleanup
2023-11-10 22:35:35 -05:00
Jacob Young
10f4486c0b
Compilation: forward clang diagnostics to error bundles
2023-11-09 16:43:12 -05:00
Andrew Kelley
94d61ce964
Merge pull request #17651 from Vexu/error-limit
...
Make distinct error limit configurable (attempt #2 )
2023-10-23 03:19:03 -04:00
Veikka Tuominen
9d9e22e716
remove uses of non-configurable err_int
2023-10-22 14:29:26 +03:00
Andrew Kelley
7bab406c79
InternPool: store alignment of anon decls
...
Commit 5393e56500d499753dbc39704c0161b47d1e4d5c has a flaw pointed out
by @mlugg: the `ty` field of pointer values changes when comptime values
are pointer-casted. This commit introduces a new encoding which
additionally stores the "original pointer type" which is used to store
the alignment of the anonymous decl, and potentially other information
in the future such as section and pointer address space. However, this
new encoding is only used when the original pointer type differs from
the casted pointer type in a meaningful way.
I was able to make the LLVM backend and the C backend lower anonymous
decls with the appropriate alignment, however I will need some help
figuring out how to do this for the backends that lower anonymous decls
via src/codegen.zig and the wasm backend.
2023-10-21 21:38:41 -04:00
Jacob Young
4d106076c3
link: initialize llvm before calling the llvm API
2023-10-19 16:51:11 -04:00
Jacob Young
fbbccc9d5f
Builder: fix incorrect type for 32-bit systems
2023-10-19 08:06:44 -04:00
Jakub Konka
8b4e3b6aee
comp: add support for -fdata-sections
2023-10-04 11:21:56 -07:00
Jacob Young
cad594372e
llvm: update address space definitions to LLVM 17
2023-09-19 09:37:32 -07:00
Jacob Young
05e01301b0
Builder: further constant select cleanup
2023-09-19 09:37:32 -07:00
Andrew Kelley
6a07b7024a
LLVM: update backend to LLVM 17
...
* LLVMConstSelect is removed (see
https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179 )
* a couple functions use uint64_t instead of int now which means we
no longer need `@intCast`.
release/17.x branch, commit 8f4dd44097c9ae25dd203d5ac87f3b48f854bba8
2023-09-19 09:37:31 -07:00
Andrew Kelley
cd8234c3ba
update for LLVM 17 new target data
...
New OSs:
* UEFI
* LiteOS
New ABI:
* OpenHOS
Also update the LLD driver API wrappers.
2023-09-19 09:37:30 -07:00
Jacob Young
4ac20f69ac
Revert "llvm: fix bootstrap"
...
This reverts commit ea72fea1a4e2bc8309c211308f49f7f2c38507be.
2023-08-20 12:40:34 -07:00
Jacob Young
1c5c3f499a
cmake: fix auto-detection of various host targets
...
Closes #16800
2023-08-13 11:26:10 -07:00
Jacob Young
c4848694d2
llvm: enable even without libllvm linked
2023-08-09 05:47:13 -04:00
Jacob Young
35cd56a369
llvm: fix alias issues
2023-08-08 21:32:50 -04:00
Jacob Young
2bdd180c6f
llvm: finish converting globals
2023-08-08 21:32:50 -04:00
Jacob Young
2499d8fb73
Builder: fix enough bugs to pass the behavior tests
...
without using any information from the LLVM API
2023-08-08 21:32:50 -04:00
Jacob Young
a66cd54f94
llvm: cleanup even more unused LLVM API bindings
2023-08-08 21:32:50 -04:00
Jacob Young
a0cb03ed99
llvm: finish converting instructions
2023-08-08 21:32:50 -04:00
Jacob Young
49cc1bff08
llvm: finish converting intrinsics
2023-08-08 21:32:50 -04:00
Jacob Young
6577f52614
llvm: convert vector reduction intrinsics
...
Scratch that thing I said about one pass. :)
2023-08-08 21:32:50 -04:00
Jacob Young
e1efd4d3c2
Builder: simplify intrinsic table
...
This format removes back-references allowing it to be parsed in a single
pass. It also reduces the number of kinds, simplifying the code.
2023-08-08 21:32:50 -04:00
Jacob Young
5b79f08ee8
llvm: finish converting attributes to use Builder and the C LLVM API
2023-08-08 21:32:50 -04:00
Jacob Young
b63d9745b5
llvm: convert intrinsics to using Builder
2023-08-08 21:32:50 -04:00
Jacob Young
3ebf8ce970
Builder: fix builtin pseudo-instruction dumping
2023-08-08 21:32:50 -04:00
Jacob Young
f938404a45
Builder: fix attribute spacing
2023-08-08 21:32:50 -04:00
Jacob Young
1c7798a3cd
Merge pull request #16705 from antlilja/builder-intrinsics
...
Implement more intrinsics in new LLVM IR builder API and remove uses of LLVM owns API
2023-08-05 23:05:02 -04:00
Robin Voetter
68f84964b3
llvm: add const addrspace cast
2023-08-05 17:11:57 -07:00
antlilja
86f61a9d26
Implement bitop intrinsics in new LLVM IR builder
...
* llvm.bitreverse
* llvm.bswap
* llvm.ctpop
* llvm.ctlz
* llvm.cttz
2023-08-06 01:46:57 +02:00
antlilja
63dcffdf9f
Implement fp intrinsics in new LLVM IR builder
...
Intrinsics implemented
* llvm.ceil
* llvm.cos
* llvm.exp
* llvm.exp2
* llvm.fabs
* llvm.floor
* llvm.log
* llvm.log10
* llvm.log2
* llvm.round
* llvm.sin
* llvm.trunc
* llvm.fma
2023-08-06 01:46:51 +02:00
Jacob Young
9e0a34f329
llvm: fix data layout calculation for experimental llvm targets
...
Closes #16616
2023-08-01 19:20:22 -07:00
Jacob Young
125b453c58
llvm: fix SysV C abi for structs smaller than two eightbytes
...
Closes #16038
Closes #16288
2023-07-28 19:27:08 -04:00
Andrew Kelley
6cee98eb30
frontend: forbid packed and extern tuples
2023-07-25 21:45:33 -07:00
Jacob G-W
3c08fe931a
make @typeInfo not return private decls
...
fixes #10731
Thanks @nektro for previous work in #14878
This change creates a small breaking change:
It removes the `is_pub` field of a decl in `@typeInfo`
2023-07-25 16:19:08 -07:00
Jacob Young
3fc2e36de2
llvm: convert global assembly
2023-07-23 23:48:19 -04:00
Jacob Young
533111e849
llvm: convert inline assembly
...
Also, implement TODOs from a previous commit.
2023-07-23 23:48:19 -04:00
Jacob Young
aa44f8f0fd
llvm: convert attributes and non-intrinsic calls
2023-07-23 23:48:18 -04:00
Andrew Kelley
a2d81c547c
llvm: fix building for 32-bit targets
2023-07-21 16:37:50 -07:00
Jacob Young
4d31d4d875
llvm: cleanup LLVM IR dumping
2023-07-20 02:44:40 -04:00
Jacob Young
a1062c63ca
llvm: add Builder trailing extra interface
2023-07-20 01:48:50 -04:00
Jacob Young
ea72fea1a4
llvm: fix bootstrap
2023-07-19 23:39:42 -04:00
Jacob Young
9dd7a9eb02
llvm: fix various crashes
2023-07-19 23:38:40 -04:00
Jacob Young
9c4d5e64b4
llvm: minor fixes
2023-07-19 23:38:40 -04:00
Jacob Young
9afb349aba
llvm: convert most instructions
2023-07-19 23:38:40 -04:00
Jacob Young
ef84e86992
llvm: convert cursor positioning
2023-07-19 23:38:40 -04:00
Jacob Young
3f46e747a8
llvm: convert basic block creation
2023-07-19 23:38:40 -04:00
Jacob Young
8fde3a8f04
llvm: finish converting constants
2023-07-19 23:38:40 -04:00
Jacob Young
1f8407c356
llvm: cleanup management and implement more const functions
2023-07-19 23:38:40 -04:00