Commit Graph

322 Commits

Author SHA1 Message Date
gingerBill
6f7a64a47d Change LTO rules for all platforms 2026-02-04 17:15:48 +00:00
Jesse Meyer
b8276065f9 Merge branch 'master' into lto-support 2026-02-03 20:52:52 -05:00
Jesse Meyer
bd6148dd6b Fix Windows LTO: preserve required procedures with llvm.used
On Windows with LTO, required procedures with external linkage need to
be added to @llvm.used to survive linker-level dead code elimination.

LLVM may generate implicit calls to runtime builtins (e.g., __extendhfsf2
for f16 conversions) during instruction lowering, after the IR is
finalized. Without @llvm.used, the linker discards these procedures
before the implicit calls are generated.

This adds required procedures to @llvm.used at creation time. The fix
is Windows-specific; other platforms handle this correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 20:16:44 -05:00
gingerBill
bb7496a2fc Add intrinsics.count_trailing_ones and intrinsics.count_leading_ones 2026-02-02 14:28:16 +00:00
gingerBill
adf56ced22 Merge pull request #6215 from odin-lang/bill/fix-data-races-2026-02
Fix numerous data races
2026-02-02 11:37:19 +00:00
gingerBill
b9e4007cb1 Merge pull request #6216 from odin-lang/bill/debug-info-fixes
Debug Info Fixes
2026-02-02 11:33:21 +00:00
gingerBill
c85af4a454 Fix #6202 2026-02-02 11:27:41 +00:00
gingerBill
63c4faca75 Fix positions for debug locations in defer, loops, and switch clauses 2026-02-02 11:19:00 +00:00
gingerBill
acabae8644 Make Entity.parent_proc_decl atomic 2026-02-02 10:58:25 +00:00
gingerBill
8a92ba74fc Make defer_use_checked and where_clauses_evaluated atomic 2026-02-02 10:56:30 +00:00
gingerBill
dc6067a8a9 Unify "mem*.inline" logic to only inline for <=8 bytes on all platforms 2026-01-22 13:18:22 +00:00
gingerBill
557e854864 -disable-unwind 2026-01-15 18:12:39 +00:00
gingerBill
f4a7e0b279 Add @(no_sanitize_thread) 2026-01-15 18:06:25 +00:00
gingerBill
5f07055ac1 Add #must_tail and "preserve/none" calling convention 2026-01-15 17:28:28 +00:00
gingerBill
0366cd3304 Add #must_tail (similar syntax to #force_inline 2026-01-15 16:32:52 +00:00
gingerBill
de761cbdd3 Remove temporary tuple fix alloca instructions if they are never used 2025-12-27 11:53:01 +00:00
gingerBill
0f0c40b96d Fix -integer-division-by-zero modes and document all-bits 2025-12-01 13:11:32 +00:00
laytan
4db4841413 fix matrix transpose with different result type
Fixes #5623
2025-11-29 12:14:06 +01:00
Laytan
a7a0a9eaf6 vendor/wgpu: update to 27.0.2.0 2025-10-15 19:49:21 +02:00
Laytan
e7ecb16a1e llvm 21 support 2025-10-14 19:55:00 +02:00
Harold Brenes
481deee4ae Fix entity nullptr check 2025-09-29 20:38:16 -04:00
Harold Brenes
5af13f5d53 Automatically emit objc_msgSend calls when calling imported or implemented Objective-C methods
- Add intrinsics.objc_super()

- Emit objc_msgSendSuper2 calls when an objc method call is combined with objc_super(self)

- Fix objc_block return value ABI for large struct returns

- Fix objc_implement method wrappers bad ABI for large struct returns and indirect args

- Simplify parameter forwarding for objc_imlpement methods

- Add intrinsics.objc_instancetype to mimi Objective-C instancetype* returns
  This facilitates returning the correct type on subclasses when calling mehtods
  such as `alloc`, `init`, `retain`, etc.

- Refactor Objective-C class implementations generation so that hierarchies are properly initialized

- Better codegen for context passing with ivar-based autocontext

- Allow @superclass on imported objc-c objects

- Better codegen for block forwarding invoker, arguments are forwarded directly
2025-09-29 20:37:48 -04:00
gingerBill
240b2f1819 Disable #raw_union constants for the time being 2025-09-29 12:54:52 +01:00
gingerBill
b711e92968 Add bit cast 2025-09-29 12:27:28 +01:00
gingerBill
ffdfbfe2c2 Begin to support constant array of unions 2025-09-28 20:20:26 +01:00
gingerBill
9b8771b475 Handle missing procedures better 2025-09-19 16:15:04 +01:00
gingerBill
6bca1475ed Convert procedures_to_generate to a queue 2025-09-19 14:15:25 +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
738a72943b Try moving parapoly procs into a separate module when doing weak monomorphization 2025-09-18 15:04:16 +01:00
gingerBill
1e0902677f Multithread min dep set by removing the set itself 2025-09-10 17:29:11 +01:00
gingerBill
8c1eda3e3a Handle fixed_point_div and fixed_point_div_sat 2025-08-08 11:10:01 +01:00
Sunagatov Denis
c22da490b9 Print the name of missing runtime procedure
This continues the fix made at 46b7abee9f,
by asserting on missing entity early and printing it's name if its not
found.
2025-08-08 04:56:59 +11:00
Harold Brenes
9d8e15b3af Implementes the block ABI.2010.3.16 natively via the objc_block intrinsic and the Objc_Block builtin type.
See: https://clang.llvm.org/docs/Block-ABI-Apple.html
2025-08-06 20:27:31 -04:00
gingerBill
2561427dd3 Add string16 and cstring16 (UTF-16 based strings) 2025-08-02 11:00:15 +01:00
Laytan
861fa4ab68 Merge pull request #4140 from colrdavidson/macharena
Mach Process control
2025-07-29 22:37:42 +02:00
Colin Davidson
4d9fdf5bd3 move to checker error, rather than panic 2025-07-29 13:09:05 -07:00
Colin Davidson
9a2e6fff48 switch to read_cycle_counter_frequency from arm64_read_cycle_counter_freq, trap on invalid arch 2025-07-29 12:21:46 -07:00
Laytan
c966e63520 fix ignored args in multi return handling
Fixes #5483
2025-07-29 19:04:49 +02:00
Colin Davidson
1848e0df05 use the correct frequency for the arm tsc timer 2025-07-28 15:10:42 -07:00
gingerBill
19a075211f Merge pull request #5442 from jon-lipstate/table_lookup
table lookup simd intrinsic
2025-07-22 11:14:54 +01:00
Jon Lipstate
6c81df82a6 cleanup langauge / errors about table vs swizzle 2025-07-16 23:43:41 -07:00
Jon Lipstate
ecd41b155d rename table_lookup to runtime_swizzle 2025-07-16 21:54:24 -07:00
Jeroen van Rijn
090cac62f9 lb_const_string -> lb_const_value 2025-07-07 20:47:49 +02:00
Jon Lipstate
fc78f6e83b x86 sse 2025-07-05 16:26:07 -07:00
Jon Lipstate
33c6a979e9 fix explicit cast 2025-07-05 14:11:29 -07:00
Jon Lipstate
019084a17f table lookup intrinsic 2025-07-05 13:55:14 -07:00
Feoramund
5b1113acb4 Ensure volatile status for all atomic operations
Fixes #2410
2025-06-20 19:43:41 -04:00
Feoramund
378e72b211 Push context onto stack before evaluating procedure parameters
Fixes #4711
2025-06-20 16:11:08 -04:00
Feoramund
9c5640886d Add @(no_sanitize_memory) proc attribute with MSan additions to base:sanitizer 2025-06-05 16:06:40 -04:00
gingerBill
d2d4ac8120 Add compress_values 2025-05-12 15:29:43 +01:00