Commit Graph

173 Commits

Author SHA1 Message Date
gingerBill
2992ca5df1 Basic support for new procedure code (non-polymorphic, non-proc-group) 2023-06-15 01:37:55 +01:00
gingerBill
151396507e Merge pull request #1309 from Yawning/fix/freebsd-syscall
src: "Fix" the system call intrinsic for FreeBSD
2023-06-07 12:04:57 +01:00
gingerBill
ca6cef9a7d Fix wasm intrinsics; fix len for strings and slices 2023-06-06 23:11:42 +01:00
gingerBill
4a75a1e839 Merge branch 'master' into separate-int-word-sizes 2023-06-06 22:42:04 +01:00
gingerBill
8bf32ac697 Minor change to handling of propagation of errors with --- as a value 2023-05-22 12:53:29 +01:00
gingerBill
8693a045bb Revert "Change intrinsics.read_cycle_counter on ARM64"
This reverts commit b567679eb6.
2023-05-12 11:50:49 +01:00
gingerBill
b567679eb6 Change intrinsics.read_cycle_counter on ARM64 2023-05-12 11:34:01 +01:00
gingerBill
685f7d0fea Rename word_size to ptr_size internally to make it clearer 2023-04-20 12:18:13 +01:00
gingerBill
02a58c1247 Merge pull request #2464 from ap29600/simd_unaligned_load
Improve code generation for `intrinsics.unaligned_load/store` on `#simd` types
2023-04-20 10:33:32 +01:00
gingerBill
72a7b35513 Merge pull request #2450 from destroycomputers/master
Fix intrinsics.alloca code generation
2023-04-20 10:25:43 +01:00
Andrea Piseri
af63eff8d7 improve code generation for intrinsics.unaligned_load/store on #simd types
the default implementation calls memcpy on an `alloca` constant, which
seems to heavily confuse the optimizer and produces overall suboptimal
code.

Introducing this specialization simplifies the intermediate
representation produced, resulting in more efficient code.
2023-04-16 15:01:30 +02:00
gingerBill
dc55e88588 Add @(deferred_*_by_ptr=<proc>) 2023-04-15 16:04:04 +01:00
destroycomputers
b6f356c211 Fix intrinsics.alloca code generation
There was a disconnect between the declared return type for alloca
intrinsic in check_builtin.cpp (multi_pointer(t_u8)) and the generated
result type in llvm_backend_proc.cpp (t_u8_ptr).

This allowed slicing the return type, but in the code generation process
the type of the expression wasn't sliceable, which triggered the assert.

Fixes #2139
2023-04-11 01:11:01 +02:00
gingerBill
8dc70f797c Increase use of temporary_allocator() where possible 2023-03-16 15:16:17 +00:00
gingerBill
c1c7128634 Minimize severe memory usage by enforcing the heap_allocator() in places 2023-03-16 15:04:57 +00:00
gingerBill
233f47cc99 Fix #2329 2023-02-19 12:47:14 +00:00
gingerBill
c08809e29d Improve handling of passing constants to implicit immutable const ref parameters 2023-02-17 14:49:37 +00:00
gingerBill
8a16fd7699 Rename built-in procedure to expand_values 2023-02-07 15:39:39 +00:00
gingerBill
0324281634 Enforce dynamic map calls for the time being 2023-02-03 15:17:30 +00:00
gingerBill
de0a3e0ab9 Minor change to byval for readonly parameters 2023-02-03 15:07:44 +00:00
gingerBill
881ef69063 Use ~{} syntax 2023-01-23 10:14:21 +00:00
gingerBill
761a19689d Escape $ in asm 2023-01-23 10:09:22 +00:00
gingerBill
5d397804f7 Fix #2286 by printing an error correctly 2023-01-16 13:22:37 +00:00
gingerBill
68b2d4b9e2 Fix #2305 2023-01-16 11:41:58 +00:00
gingerBill
3b22c6620c Begin to generalize modules away from AstPackage * in -use-separate-modules 2023-01-12 17:13:25 +00:00
gingerBill
402a165b60 Correct missing procedures in other build modules which cause a linkage problem 2023-01-12 16:59:16 +00:00
gingerBill
252be0fb41 Make all maps use heap allocator implicitly 2023-01-03 11:59:52 +00:00
gingerBill
fa562ec5d6 Remove unneeded local_entity_map 2023-01-02 15:40:25 +00:00
gingerBill
529383f5b1 Correct a race condition when checking the procedure body 2023-01-02 15:30:04 +00:00
gingerBill
9b278db993 Revert "Change tav to be a pointer internally"
This reverts commit e98f1a28e6.
2022-12-22 12:01:41 +00:00
gingerBill
e98f1a28e6 Change tav to be a pointer internally 2022-12-22 11:53:13 +00:00
gingerBill
c1f5be24e2 Remove dead code in the compiler 2022-12-18 22:49:10 +00:00
gingerBill
6cdec65ca1 gb_internal LLVM backend 2022-12-18 22:32:05 +00:00
gingerBill
1f8f94276e Initialize the multiple return value map in lb_create_dummy_procedure 2022-12-07 16:44:26 +00:00
gingerBill
d88b052d2d Naïve optimization of named _split_ multiple return valued when defer is never used
This is a naïve optimization but it helps a lot in the general case where callee temporary stack variables
are not allocated to represent the named return values by using that specific memory.

In the future, try to check if a specific named return value is ever used a `defer` within a procedure or not,
or is ever passed to a nested procedure call (e.g. possibly escapes).
2022-11-25 23:57:55 +00:00
gingerBill
615eccb6d1 Correct return ptr semantics for split returns 2022-11-24 14:26:45 +00:00
gingerBill
0befadde1d Basic copy elision support for multiple return values 2022-11-24 01:27:39 +00:00
gingerBill
aef8b25a8e Listen to past Bill's wisdom 2022-11-23 23:54:12 +00:00
gingerBill
7ab591667a Basic support for new ABI experiment on Win64 2022-11-23 16:25:09 +00:00
gingerBill
0a0db23b17 Remove copy elision code 2022-11-22 15:49:27 +00:00
gingerBill
1baa47c78e Fix #2179 2022-11-21 11:31:35 +00:00
gingerBill
5bbab05161 Fix #2199 2022-11-21 11:02:52 +00:00
gingerBill
25bec19b1f Revert "Minor improvement to multi return value reducing stack usage" 2022-11-13 23:56:05 +00:00
gingerBill
d2019e3e4d Enforce pointer cast 2022-11-13 23:50:45 +00:00
gingerBill
a705a2e38b Minor improvement to multi return value reducing stack usage 2022-11-13 22:55:32 +00:00
gingerBill
2b83f27f06 Merge branch 'master' into map-dev 2022-11-11 15:54:33 +00:00
gingerBill
fcd8860990 Make intrinsics.ptr_sub use explicit integer arithmetic internally 2022-11-11 15:52:49 +00:00
gingerBill
8852d090b6 Correct static map get; make get take a pointer to simplify compiler internals 2022-11-10 12:46:53 +00:00
gingerBill
a74093784c Add intrinsics.map_cell_info and intrinsics.map_info 2022-11-08 12:24:00 +00:00
gingerBill
ed58374964 Make Map_Info store pointers to cell info rather than inline 2022-11-08 12:18:36 +00:00