Commit Graph
806 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 8c55db676a Revert running each module's backend stages as one task, as it did not help in terms of performance 2026-10-05 11:57:07 +01:00
gingerBill 8cadb56bbb Run each module's stages after procedure generation as one task, from verification through its object, ordered by the module's cost 2026-10-05 11:45:46 +01:00
gingerBill e774d7954c Allow the compiler with slightly older forms of the compiler which only have default_hasher and not default_hasher_fixed 2026-10-04 19:36:19 +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 6fbc112088 Lower more instructions for the fast instruction selector in LLVM 2026-10-04 10:05:19 +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 cd08004d33 Free the temporary memory of each procedure once it is generated; keep the strings used as keys of the constant string maps permanently 2026-10-03 18:38:09 +01:00
gingerBill b4612c77c4 Merge branch 'master' into bill/map-improvements 2026-10-03 17:24:54 +01:00
gingerBill 70f6767776 Make lb_map_set_proc_for_type prefer to go through the runtime for unoptimized builds 2026-10-03 16:15:59 +01:00
gingerBill f86c53f13a Do Robin Hood displacement in __$map_set when no tombstone is in the way 2026-10-03 15:32:09 +01:00
gingerBill 0ea9b17c36 Fix the probe distance in __$map_get and store directly into an empty slot in __$map_set, which also improves a map's performance 2026-10-03 14:53:55 +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 e7b7705042 Setup the type info data in the default module's task rather than before the modules are generated in parallel 2026-10-02 23:30:24 +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 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 6a8d6e0ca4 Verify each module once its procedures are generated rather than each procedure, which for those referenced by the type info walked all of the type info each time; only verify the procedures on their own on a failure 2026-10-02 15:55:54 +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 5f579a1a10 Fix numerous race conditions: clone polymorphic defaults per call, evaluate foreign import attributes after collection, own dependencies for record instances, sorted Objective-C emission, no debug line for anonymous records 2026-10-01 21:55:25 +01:00
gingerBill 73c3a96de1 Make global checking state thread-safe: read-only global scopes, per-group untyped and #soa, deferred link-name checks, fresh contexts for on-demand globals 2026-10-01 21:07:41 +01:00
gingerBill 38fa57e907 Make global checking and codegen order-independent 2026-10-01 15:01:14 +01:00
Jeroen van Rijn 650c558cb9 Merge pull request #7445 from kalsprite/target_feature_empty_element
string_split_iterator fix
2026-08-24 18:03:35 -07:00
kalsprite 7bf266ef93 string_split_iterator fix 2026-08-24 17:32:30 -07:00
Mihail Moskov 74ac336ef1 fixes -o:size 2026-08-24 12:53:05 +03:00
korvahkh 02246ac6fd Implement fixes for constant unions
Note that with this commit, casting through
multiply-nested unions is forbidden, e.g.
```
U :: union {int, V}
V :: union {bool}
x: U = true
```
does not compile.
(Previously the compiler would simply crash)

This is to avoid situations where adding variants
can lead to unexpected changes in the value.

For example if `U` is changed to have a `bool`
variant of its own:
```
U :: union {int, bool, V}
```
Then `x: U = true` would equal
`U(true)` instead of `U(V(true))`.

Single-variant unions are exempt, primarily to
improve the ergonomics of `Maybe` in cases like:
```
x: Maybe(union{int, bool}) = 1
```

Fix #6100
Fix #6699
Fix #6895
Fix #6896
Fix #6897
Fix #7036
Fix #7083
Fix #7091
2026-08-19 20:12:56 -05:00
kalsprite cf5f181228 peel union constant to its variant 2026-08-19 16:30:37 -07:00
kalsprite cd8fc51efc codegen worker must not exit process with running siblings 2026-08-19 13:44:32 -07:00
gingerBill 9870cd4c36 Merge pull request #7271 from odin-lang/bill/inline-asm
`asm` templates
2026-08-18 19:19:40 +02:00
gingerBill 645b57be9f Merge pull request #7327 from kalsprite/abi_conformance
ABI Conformance Harness + Fixes
2026-08-17 16:28:01 +02:00
gingerBill 1f2234a4b2 Merge branch 'master' into bill/inline-asm 2026-08-17 11:44:14 +01:00
kalsprite 9047c60ec1 arm32: default to arm1176jzf-s so the gnueabihf triple actually has an FPU,
arm32: implement AAPCS32 homogeneous float aggregates incl unions,
arm32: fix reversed arguments in the small-struct return coercion,abi test: __aeabi_uldivmod so the arm32 corpus links
2026-08-14 18:08:11 -07:00
corley de9d6d7dcc Reenables LLVMSetUnnamedAddress for global constants folding 2026-08-14 23:12:25 +03:00
A1029384756 a08682bcd3 [llvm_backend] fix duplicated name for .ll files 2026-08-11 16:30:35 -04:00
gingerBill 036e38442b Begin work on lb_emit_asm_template_call 2026-08-09 21:55:36 +01:00
David Bader 865b97fa9e Make object and assembly file extensions user-changeable again 2026-07-14 14:02:09 +02:00
Jagi Natarajan 8727db41f7 Fix regression, fetch obj-c superclass name instead of class name 2026-07-09 14:24:40 -04:00
Jeroen van Rijn 94be05ead1 Merge pull request #6918 from Kelimion/deprecate-llvm-14
Remove LLVM 14 support
2026-07-03 21:35:47 +02:00
Jeroen van Rijn 03652d7423 Improve custom output location for LLVM-IR, OBJ + ASM
Fixes #6926.

If `build` is a subdirectory in the current directory, then `odin build . -out:build` will place `.S`, `.obj` and `.ll` files there if the corresponding `-build-mode` is given.
2026-07-02 14:19:56 +02:00
Jeroen van Rijn 2d2979a5f2 Remove old pass manager 2026-06-30 22:44:28 +02:00
gingerBill 40e54a97ed Merge branch 'master' into bill/bedrock 2026-06-24 11:07:02 +01:00
gingerBill 69daa4d184 Merge pull request #6830 from A1029384756/stack-canaries
Stack canaries
2026-06-19 09:11:40 +01:00
Franz 5fdfbf7c06 Fix initialization of global anys 2026-06-16 00:24:47 +02: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
A1029384756 43b057dfeb [linux] change default settings to enable pie and full relro 2026-06-06 21:23:26 -04:00
gingerBill 8d1d126e16 Rearrange context and value_type values of lb_const_value 2026-06-05 10:19:55 +01:00