Commit Graph

281 Commits

Author SHA1 Message Date
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
A1029384756
8bd95d4082 [stack-canaries] fixed stack canaries on arm linux 2026-06-13 01:52:19 -04:00
A1029384756
da742fc526 [no-plt] enable no-plt behavior on linux arm64 and amd64 targets 2026-06-08 10:58:05 -04:00
Franz Hoeltermann
f43b604eb3 Fix #no_bounds_check (previously broken by fc41e4414)
arr[:end] expressions would previously emit bounds checks even
with #no_bounds_check, breaking spall
2026-04-10 02:21:36 +02:00
Jeroen van Rijn
c29fd7f872 Merge pull request #6436 from nathanchere/patch-1
Update build_odin.sh to support LLVM 22
2026-03-19 19:18:31 +01:00
Nathan Chere
c2e42fe455 Remove deprecated LLVMGetGlobalContext calls 2026-03-18 21:11:12 +01:00
gingerBill
04cb889aed Begin interning ScopeMap strings 2026-03-17 11:04:32 +00:00
gingerBill
1744f57d01 Use permanent_alloc_item directly rather than through the gb_alloc_item generic interface 2026-03-16 16:03:27 +00:00
gingerBill
fc41e44140 Improve bounds checking to minimize its need 2026-03-16 14:29:44 +00:00
gingerBill
0bf2d01a04 Work on improving bounds checking with constant known indices and lb_add_local_generated 2026-03-16 14:06:23 +00:00
gingerBill
38d7f45e64 Fix race condition with code_gen_module 2026-03-15 21:35:02 +00:00
gingerBill
c51391f8cb Fix #5129 2026-03-15 17:15:16 +00:00
gingerBill
f1dbe9c242 [dynamic; N]T proof of concept: fixed capacity dynamic array (akin to small_array.Small_Array(N, T)) 2026-03-11 16:46:33 +00:00
Jesse Meyer
1a7f78b665 Add ThinLTO support via -lto:thin and -lto:thin-files flags
- Add -lto:thin and -lto:thin-files CLI flags with validation
- Emit LLVM bitcode (.bc) instead of object files when LTO is enabled
- Pass -flto=thin and -flto-jobs to clang/lld linkers
- Guard linkage corrections to skip declarations without definitions
  (required for LTO where declarations appear across modules)
- Allow module-per-file with LTO even at higher optimization levels

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:04:53 -05:00
gingerBill
93d7e2a452 Add globaldynamic thread_local model (same as the current default) 2025-12-30 13:08:30 +00:00
Jeroen van Rijn
faa9222fef Set minimum #load(file, type) alignment to 16 bytes 2025-10-15 18:04:24 +02:00
Username-Leon
4dd6bb2e87 Merge branch 'master' of https://github.com/LeonardoTemperanza/Odin 2025-10-15 15:30:32 +02:00
Username-Leon
e10093bd99 Fix wrong alignment for typed load directive. 2025-10-15 15:30:06 +02:00
Laytan
e7ecb16a1e llvm 21 support 2025-10-14 19:55:00 +02:00
A1029384756
be9384fc8d [llvm-14-fixes] use specific LLVMConst* codepaths for LLVM 14 2025-10-09 12:03:25 -04:00
A1029384756
b55cf5f8f4 llvm 14 fixed 2025-10-07 22:58:50 -04:00
gingerBill
34d040cef1 Correct format strings 2025-09-29 16:51:38 +01:00
gingerBill
cbab97fbd7 Use memcpy for local constant slice arrays from a global constant 2025-09-28 22:50:36 +01:00
gingerBill
f743110f63 Correct union type checking for constants 2025-09-28 21:00:36 +01:00
gingerBill
ffdfbfe2c2 Begin to support constant array of unions 2025-09-28 20:20:26 +01:00
gingerBill
ad85ec765b More const union improvements 2025-09-24 10:29:32 +01:00
gingerBill
bad495519b Improve const union attemps 2025-09-24 10:08:25 +01:00
gingerBill
31f0aaa62f Try to improve const union LLVM construction 2025-09-24 09:55:22 +01:00
gingerBill
2f132b51ce Add missing gen 2025-09-23 01:23:01 +01:00
gingerBill
f36ade8c64 Remove extra checks 2025-09-19 16:44:57 +01:00
gingerBill
9b8771b475 Handle missing procedures better 2025-09-19 16:15:04 +01:00
gingerBill
655176e5e7 Remove comments of dead code 2025-09-19 15:17:38 +01:00
gingerBill
76705c6800 Convert missing_procedures_to_check to a queue 2025-09-19 14:18:09 +01:00
gingerBill
6bca1475ed Convert procedures_to_generate to a queue 2025-09-19 14:15:25 +01:00
gingerBill
a8b2b1a23b Temporarily revert anonymous procedure load balancing 2025-09-19 13:49:09 +01:00
gingerBill
6338e0a8a3 Allow unions with one variant to be constant 2025-09-19 11:56:44 +01:00
gingerBill
1a4da5cb0f Distribute anonymous procedure literals correctly across LLVM modules 2025-09-19 11:13:18 +01:00
gingerBill
6ce889f4eb Entity * to std::atomic<Entity *> to remove the need for a PtrMap+Mutex 2025-09-19 11:01:41 +01:00
gingerBill
5d14df4112 Multithread lb_module_init 2025-09-18 23:26:11 +01:00
gingerBill
9cf69576ab More improvements to minimize code gen size 2025-09-18 20:58:24 +01:00