Jacob Young
f644263a6c
Builder: fix llvm ir/bc difference with allocas
2024-02-23 18:17:14 +01:00
Jacob Young
7f3ade6dea
Builder: fix x86_fp80 constants in bitcode
2024-02-23 09:15:58 +01:00
Jacob Young
800495afab
Builder: fix minor llvm ir syntax errors
2024-02-23 07:51:38 +01:00
Jacob Young
6abb432598
Builder: implement opaque structs in bitcode
2024-02-23 07:51:38 +01:00
Jacob Young
43daed64fe
Builder: change tuple metadata to not be inlined in llvm ir
2024-02-23 06:18:10 +01:00
Jacob Young
be4ad235a7
Builder: fix inconsequential llvm ir metadata syntax
2024-02-23 03:23:49 +01:00
Jacob Young
8d0f6605fe
Builder: sync distinct bits with previous implementation
2024-02-23 03:23:49 +01:00
antlilja
dfde194287
LLVM Builder: Make some Metadata no longer be distinct
2024-02-23 03:12:54 +01:00
antlilja
0ba2185a42
LLVM Builder: Formatting
2024-02-23 03:12:35 +01:00
Jacob Young
c894df54f7
Builder: fix debug location of the first instruction in a block
2024-02-23 01:45:25 +01:00
Jacob Young
dbfa3238fe
Builder: fix float constants in llvm ir
2024-02-22 23:51:53 +01:00
Jacob Young
83e66d301e
Builder: fix bitcode strtab
2024-02-22 19:50:41 +01:00
Jacob Young
69a6f31596
Builder: fix llvm ir value names
...
Hello world now verifies when not stripped.
2024-02-22 19:10:52 +01:00
antlilja
de536e8473
LLVM Builder: Emit metadata kinds and function metadata attachments
2024-02-22 15:29:28 +01:00
antlilja
92eec8dfec
LLVM Builder: Emit type for debug subprogram
2024-02-22 15:24:22 +01:00
Jacob Young
4b215e3a11
Builder: support printing metadata in llvm ir
2024-02-22 08:54:35 +01:00
antlilja
53f6071486
LLVM Builder: Emit debug vector types with DIVector flag
2024-02-21 23:33:25 +01:00
antlilja
e57f553c07
LLVM Builder: Rework MetadataString to not rely on String
...
This fixes a problem where empty strings where not emitted as null.
This should also emit a smaller stringtab as all metadata strings were
emitted in both the strtab and in the strings block inside the metadata
block.
2024-02-21 21:46:04 +01:00
Jacob Young
48bd0ed7f3
llvm: fix builds that don't link with libllvm
2024-02-21 19:18:34 +01:00
antlilja
f6d275b14e
LLVM: Remove use of LLVM in Builder
2024-02-21 17:53:15 +01:00
antlilja
626c3f7959
LLVM Builder: Emit debug info and metadata
2024-02-21 16:24:59 +01:00
antlilja
049cad4411
LLVM Builder: Add debug locations to instructions
2024-02-21 16:24:59 +01:00
antlilja
a456631e29
LLVM Builder: Add debug/metadata system
2024-02-21 16:24:59 +01:00
antlilja
b4369dfbda
LLVM: Add toBitcode to Builder
2024-02-21 16:24:59 +01:00
antlilja
4653fc4bb4
LLVM Builder: Add dbg.declare and dbg.value intrinsics
2024-02-21 16:24:59 +01:00
antlilja
15029590ee
LLVM Builder: Add integer values to more enums fields
2024-02-21 16:24:59 +01:00
antlilja
ec5a433fdf
Fix FastMath packed struct
...
* Added missing legacy field (unused_algebra)
* Made struct correct size (u32 -> u8)
2024-02-21 16:24:59 +01:00
antlilja
7cb8813743
Added value_indices and valueIndex to Function
...
value_indices keeps track of the value index of
each instruction in the function (i.e skips
instruction which do not have a result)
2024-02-21 16:24:59 +01:00
antlilja
423c2c3a27
Made .block = false in WipFunction.hasResultWip
2024-02-21 16:24:59 +01:00
antlilja
c57b4e70b0
Builder: Add function_attributes_set
2024-02-21 16:24:59 +01:00
antlilja
52e8434022
Added opcode functions to Instruction/Constant.Tag
2024-02-21 16:24:59 +01:00
antlilja
ff76ba64d6
Added values to AtomicRmw.Operation enum fields
2024-02-21 16:24:59 +01:00
antlilja
6df8302be6
Fixed values in AtomicOrdering enum
2024-02-21 16:24:59 +01:00
antlilja
fd3b81f93b
LLVM Builder: Add toLlvm helper to Alignment
2024-02-21 16:24:59 +01:00
antlilja
2801bf6400
LLVM Builder: Add strtab helper to String
2024-02-21 16:24:59 +01:00
antlilja
9ccd7158b9
LLVM Builder: Make Type.Simple reflect LLVM codes
2024-02-21 16:24:59 +01:00
antlilja
8feae5d2d5
LLVM: Assign correct values to enum/union tags
2024-02-21 16:24:59 +01:00
Jacob Young
38c2a25735
Builder: fix memory leaks
2024-02-06 22:31:13 -05:00
Jacob Young
eaa6218f09
x86_64: fix errors compiling the compiler
...
This fixes issues targetting both `x86_64-linux` and `x86_64-macos` with
the self-hosted backend.
2024-02-04 22:58:38 -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
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
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