Commit Graph

337 Commits

Author SHA1 Message Date
gingerBill
68942ce53d Genericize simd_approx_recip_(sqrt) to allow for AVX and AVX512 intrinsics if enabled 2026-04-08 10:56:52 +01:00
gingerBill
6f7226e692 Add intrinsics.simd_pairwise_(add|sub) 2026-04-07 15:45:50 +01:00
gingerBill
6e09ce9a04 intrinsics.to_bits_signed; simd.signbit 2026-04-07 15:25:41 +01:00
gingerBill
5de18d30f3 Add intrinsics.simd_approx_recip and intrinsics.simd_approx_recip_sqrt 2026-04-07 14:35:04 +01:00
gingerBill
885db93e20 Add intrinsics.simd_sums_of_n 2026-04-07 13:18:03 +01:00
gingerBill
30b6fab120 Fix simd.scatter/simd.gather for LLVM 22 2026-04-07 11:46:57 +01:00
gingerBill
ac1b5aea0f Add intrinsics.simd_odd_even; More core:simd operations 2026-04-07 11:35:20 +01:00
Yawning Angel
62d78d61fa src: Allow clang-style +/- for target features
This largely works as expected, except that as far as I can tell,
without explicit annotations added to the caller, (or a
`#force_inline`), the LLVM `target-features` function attribute
gets ignored by the inliner under the rationale of `-sse,-avx,-avx2`
is a subset of `+sse,+avx,+avx2`.

With `#force_no_inline` the correct code does get generated, but in
the regression I am trying to fix, the caller gratuitously also uses
SIMD, leading to horrific performance.
2026-03-19 19:25:23 +09: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
5d165f70e1 Add loads of RVO optimizations for basic 1-value return cases 2026-03-15 21:53:38 +00:00
gingerBill
bb2e42faa6 More uses of SSA aggregation values 2026-03-15 19:49:26 +00:00
gingerBill
a0685f0511 Add intrinsics.likely and intrinsics.unlikely 2026-03-15 15:39:52 +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
Jeroen van Rijn
5d94c01e47 Disable LLVMTailCallKindMustTail under LLVM 18 2026-02-21 23:29:32 +01:00
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