Matthew Lugg
e82f7d3800
Merge pull request #20653 from mlugg/incremental-fix
...
Zcu: updateZirRefs typo
2024-07-17 00:08:13 +01:00
Jacob Young
88bb0fd288
Merge pull request #20632 from jacobly0/codegen-thread
...
InternPool: enable separate codegen/linking thread
2024-07-16 14:49:49 -04:00
mlugg
21cde7ad90
Zcu: updateZirRefs typo
2024-07-16 19:46:10 +01:00
Matthew Lugg
ee695c8ef4
Merge pull request #20637 from mlugg/comptime-resolution-strat
...
Type,Value: mark `ResolveStrat` parameter of type queries as `comptime`
2024-07-16 19:22:39 +01:00
mlugg
b1d3d48f68
Type,Value: mark ResolveStrat parameter of type queries as comptime
...
This eliminates the statically-reachable recursion loop between code
generation backends and Sema. This is beneficial for optimizers
(although I do not measure any performance improvement for this change),
and for profilers.
2024-07-16 11:38:20 +01:00
Jacob Young
9d1820d206
InternPool: reduce max tid width by one bit
...
@mlugg keeps stealing my bits!
2024-07-16 06:28:41 -04:00
Andrew Kelley
60318a1e39
frontend: move updateZirRefs to be single-threaded
...
for simplicity's sake. This makes it O(M) instead of O(N*M) where N is
tracked insts and M is number of changed source files.
2024-07-15 18:54:41 -07:00
Andrew Kelley
716b128a24
frontend: add -fincremental, -fno-incremental flag
...
Remove --debug-incremental
This flag is also added to the build system. Importantly, this tells
Compile step whether or not to keep the compiler running between
rebuilds. It defaults off because it is currently crashing
zirUpdateRefs.
2024-07-14 21:18:09 -07:00
Andrew Kelley
abf8955951
make zig compiler processes live across rebuilds
...
Changes the `make` function signature to take an options struct, which
additionally includes `watch: bool`. I intentionally am not exposing
this information to configure phase logic.
Also adds global zig cache to the compiler cache prefixes.
Closes #20600
2024-07-14 19:51:16 -07:00
Jacob Young
2ff49751aa
Compilation: introduce work stages for better work distribution
2024-07-13 04:47:38 -04:00
Jacob Young
a1053e8e1d
InternPool: add and use a mutate mutex for each list
...
This allows the mutate mutex to only be locked during actual grows,
which are rare. For the lists that didn't previously have a mutex, this
change has little effect since grows are rare and there is zero
contention on a mutex that is only ever locked by one thread. This
change allows `extra` to be mutated without racing with a grow.
2024-07-13 04:47:38 -04:00
Andrew Kelley
5a34e6c3e6
frontend: add file system inputs for incremental cache mode
...
These are also used for whole cache mode in the case that any compile
errors are emitted.
2024-07-12 00:15:11 -07:00
Jacob Young
c2316c5228
InternPool: make global_error_set thread-safe
2024-07-10 21:39:55 -04:00
Jacob Young
afa66fa392
InternPool: make tracked_insts thread-safe
2024-07-10 14:42:50 -04:00
Jacob Young
f290b54f89
InternPool: make files more thread-safe
2024-07-10 11:20:08 -04:00
Jacob Young
8f292431b0
InternPool: fix undefined decl fully qualified name
...
This is now possible after moving `File.Index` to `*File` mapping into
intern pool.
2024-07-10 11:20:08 -04:00
Jacob Young
3d2dfbe828
InternPool: add FileIndex to *File mapping
2024-07-10 11:20:08 -04:00
mlugg
f93a10f664
Air: store param names directly instead of referencing Zir
2024-07-10 11:20:08 -04:00
Jacob Young
667b4f9054
Zcu: cache fully qualified name on Decl
...
This avoids needing to mutate the intern pool from backends.
2024-07-10 11:10:49 -04:00
Andrew Kelley
b3b923e51f
Merge pull request #20561 from jacobly0/debug-segfaults
...
debug: prevent segfaults on linux
2024-07-09 21:03:36 -04:00
Jacob Young
c5283eb49b
InternPool: implement thread-safe allocated lists
2024-07-09 17:29:01 -04:00
mlugg
47846bc17c
Zcu: fix passing exported decls with compile errors to the backend
2024-07-09 12:53:19 -04:00
Jacob Young
65ced4a334
Compilation: put supported codegen backends on a separate thread
...
(There are no supported backends.)
2024-07-08 11:00:38 -04:00
Jacob Young
bdae01ab04
InternPool: implement and use thread-safe list for extra and limbs
2024-07-07 22:59:52 -04:00
Jacob Young
383cffbfae
InternPool: temporarily disable multi-threaded behavior
...
This reduces the cost of the new data structure until the multi-threaded
behavior is actually used.
2024-07-07 22:59:52 -04:00
Jacob Young
92ddb959a7
InternPool: implement and use thread-safe list for items
2024-07-07 22:59:52 -04:00
Jacob Young
8293ff94cf
InternPool: implement and use thread-safe list for strings
2024-07-07 22:59:52 -04:00
Jacob Young
ca02266157
Zcu: pass PerThread to intern pool string functions
2024-07-07 22:59:52 -04:00
Jacob Young
525f341f33
Zcu: introduce PerThread and pass to all the functions
2024-07-07 22:59:52 -04:00