Commit Graph
320 Commits
Author SHA1 Message Date
gingerBill c5cfff4e3c With -use-separate-modules, make the type info in modules of its own of about ~1000 entries each rather than all in the default module 2026-10-05 12:25:58 +01:00
gingerBill 7cbb04159d Name nested and anonymous procedures from their enclosing declarations alone so the name never depends on which module names them first 2026-10-04 23:22:32 +01:00
gingerBill 0cbc5a6602 Define an anonymous procedure in every module that reaches it, so which module defines it never depends on timing 2026-10-04 23:02:40 +01:00
gingerBill 18aead3ba1 Merge pull request #7729 from odin-lang/bill/llvm-backend-improvements
LLVM Backend Performance Improvements to Reduce Compile Times Part 2
2026-10-04 19:01:11 +01:00
gingerBill ccf1ae4fe9 Move the lowering for LLVM's fast instruction selector to llvm_backend_opt.cpp 2026-10-04 10:16:50 +01:00
gingerBill bdb0364739 Remove the missing procedures fallback from the backend: the checker adds the Objective-C runtime procedures the backend calls, local foreign procedures with a duplicate name are bound to the existing declaration, and local procedures passed to a $ parameter are created up front 2026-10-03 22:26:08 +01:00
gingerBill b4612c77c4 Merge branch 'master' into bill/map-improvements 2026-10-03 17:24:54 +01:00
gingerBill 93e160582c Pass a copy of a value within a packed struct to a procedure by reference when its address is not known to be aligned to its type, and lower the alignment of loads and stores to that known from the GEPs leading to their address 2026-10-03 16:41:48 +01:00
gingerBill d8da5185c9 Store a constant holding a misaligned pointer directly rather than copying it from a constant global, which Apple's linker rejects 2026-10-03 14:47:38 +01:00
gingerBill 5031e2733e Add the comparison procedures of types in the type table and map keys as dependencies making the backend no longer has to create missing procedures 2026-10-03 12:38:00 +01:00
gingerBill e5cc35c445 Lower what LLVM's fast instruction selector cannot select before emitting objects, and declare debug variables through stack slots 2026-10-03 11:02:55 +01:00
gingerBill f670de9e80 Define and initialize global variables in their own modules 2026-10-03 08:28:31 +01:00
gingerBill 29106aaa1e Cache type layouts and union constantability, build nested constants once, create debug files lazily 2026-10-03 01:26:01 +01:00
gingerBill a7ded94e52 Begin the costliest modules first in each backend stage; run function passes in parallel with -debug; spread the instances of oversized modules over further modules; trim comments 2026-10-02 23:15:43 +01:00
gingerBill 735b2c7060 Pass a copy of a packed struct's field by reference when it may be under-aligned; lower load and store alignment to that known 2026-10-02 22:49:26 +01:00
gingerBill 63d28377bb Pass a copy of a value within a packed struct to a procedure by reference when its address is not known to be aligned to its type, and lower the alignment of loads and stores to that known from the GEPs leading to their address 2026-10-02 17:22:15 +01:00
gingerBill d958fd7abb Allow -build-mode with odin test; Copy a "just loaded" aggregate as integers in the startup procedure and with -o:none as LLVM's fast instruction selector cannot select an aggregate load or store 2026-10-02 16:40:54 +01:00
gingerBill cbcf315184 Generate a package with much more code than a 32nd of all of it in several modules of contiguous files, estimated by the bodies of its used procedures, as each module is generated by one thread 2026-10-02 16:11:18 +01:00
gingerBill 03852e7af8 Generate each global's initialization in its own block of the startup procedure; generate the procedure literals reached from the initializations of globals in their own package's module rather than the default module 2026-10-02 15:36:04 +01:00
gingerBill 40f3df53bb Merge pull request #7694 from odin-lang/bill/multithread-global-decls
Make global checking codegen order-independent
2026-10-01 15:36:48 +01:00
gingerBill 38fa57e907 Make global checking and codegen order-independent 2026-10-01 15:01:14 +01:00
Mihail Moskov 8d745e8288 fixes the nocapture attribute on llvm >= 21 2026-09-30 17:10:18 +03:00
gingerBill 3f518fd130 Merge pull request #7602 from corleypc/lifetime-markers
Adds lifetime markers for named locals
2026-09-29 17:44:06 +01:00
gingerBill 6653101e61 Fix race condition with unlocking something too early 2026-09-29 16:46:46 +01:00
corley bac6130710 lifetime markers for named locals 2026-09-20 15:55:26 +03:00
Mihail Moskov 74ac336ef1 fixes -o:size 2026-08-24 12:53:05 +03:00
mo 23bd3cd927 detect invalid block size caused by a void type
Fixes #7008

When a union variant includes a pointer to a forward type, `lb_sizeof`
returns 0 for the size of the block. This causes an extra padding word
to be added to the llvm type, causing a size_of and type_of mismatch.

The fix detects the 0 size and falls back to using `type_size_of` on
the first variant.
2026-08-21 21:58:21 +12:00
kalsprite cd8fc51efc codegen worker must not exit process with running siblings 2026-08-19 13:44:32 -07:00
gingerBill 645b57be9f Merge pull request #7327 from kalsprite/abi_conformance
ABI Conformance Harness + Fixes
2026-08-17 16:28:01 +02:00
Jeroen van Rijn a0b475eef9 Merge pull request #7361 from ssenthilnathan3/fix/recursive-soa-sigbus
Fix: SIGBUS/segfault when compiling recursive #soa slice/dynamic array types
2026-08-17 13:16:18 +02:00
Senthilnathan f6f686392a Merge branch 'master' into fix/recursive-soa-sigbus 2026-08-17 12:53:33 +05:30
Senthilnathan 4fe5719007 Fix SIGBUS/segfault when compiling recursive #soa slice/dynamic array types 2026-08-17 12:48:41 +05:30
corley de9d6d7dcc Reenables LLVMSetUnnamedAddress for global constants folding 2026-08-14 23:12:25 +03:00
kalsprite 98e580404a pack structs whose member alignment LLVM would raise above the target cap
arm64: return a narrow bare vector as itself, not coerced to an integer
2026-08-13 21:52:34 -07:00
corley 87912a8b88 fixes range loop over array elements in soa containers 2026-08-11 03:20:13 +03:00
corley e374541599 fixes chained indexing for soa containers with array element type 2026-08-09 22:23:32 +03:00
corley 7b45adf8e9 fixes swizzling for array elements in soa arrays/slices 2026-08-09 03:17:04 +03:00
gingerBill 9914a57fc7 Add intrinsics.soa_copy_from_slice and use it within _append_soa_elems replacing the old handwritten unrolled approach 2026-08-03 14:41:04 +01:00
Franz cd577b2eef Shrink lock region of func_raw_types_mutex to avoid deadlock. 2026-07-15 23:14:24 +02:00
Isabella Basso 43923eb3cb compiler: fix constant aggregate rebuild
fixes: #7005
2026-07-15 05:29:38 -03:00
Jeroen van Rijn 6154d5c577 Further LLVM 14 support removal. 2026-06-30 21:16:48 +02:00
gingerBill 62511914de When inserting a constant union into a struct literal, rebuild the struct to be non-named with llvm_const_insert_value_with_rebuild 2026-06-30 12:16:21 +01:00
gingerBill e24bbb813c Merge branch 'master' into bill/constant-union-fixes 2026-06-29 13:02:12 +01:00
gingerBill b9a9846b7c Fix constant union stuff against tests 2026-06-29 13:00:44 +01:00
gingerBill 42f681baff Revert some of the union changes 2026-06-29 12:18:40 +01:00
gingerBill 2f3174fe10 Fix llvm_const_cast with constant union literals 2026-06-29 11:41:27 +01:00
gingerBill e227c736e6 Fix #6786 2026-06-29 10:49:29 +01:00
gingerBill 2aea1d13f1 Improve lb_copy_bits 2026-06-22 12:55:50 +01:00
gingerBill 8971e0f1ec Fix shifting buf in lb_copy_bits 2026-06-22 12:55:45 +01:00
gingerBill 900ebd6b5b Heavily improve reading and writing to bit fields 2026-06-22 12:55:29 +01:00