Commit Graph

345 Commits

Author SHA1 Message Date
gingerBill
1c9fa5d0b7 Merge pull request #6731 from odin-lang/bill/expand-values-operator
Support `**` as `expand_values` operator: `**x` == `expand_values(x)`
2026-06-05 11:42:08 +01:00
gingerBill
a479eb7775 Support @(link_section=<string>) for procedures 2026-06-02 13:09:40 +01:00
gingerBill
fb8a9d0839 Support ** as expand_values operator: **x == expand_values(x) 2026-05-25 10:28:15 +01:00
kalsprite
98d6e0c26a ARM chunking logic, improved docs 2026-05-20 17:55:29 -07:00
kalsprite
ae4b94fbd0 fix overloaded call 2026-05-20 16:57:05 -07:00
gingerBill
a91725f305 Add simd.interleave + simd.deinterleave 2026-05-19 21:32:09 +01:00
gingerBill
a3240373ac Allow simd.(reduce_any|reduce_all) to work with #simd integers 2026-05-19 15:33:45 +01:00
gingerBill
7b97530443 Add intrinsics.c_var_* 2026-04-28 15:00:53 +01:00
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