Commit Graph

88 Commits

Author SHA1 Message Date
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
ae81117f70 Merge branch 'master' into multiple-return-abi-experiment 2022-11-23 23:43:00 +00:00
gingerBill
d6cb105d5f Fix LLVM type cycle nonsense with procedure types 2022-11-23 23:32:34 +00:00
gingerBill
7ab591667a Basic support for new ABI experiment on Win64 2022-11-23 16:25:09 +00:00
gingerBill
cb183e968a Fix #2202 2022-11-21 10:30:59 +00:00
gingerBill
25bec19b1f Revert "Minor improvement to multi return value reducing stack usage" 2022-11-13 23:56:05 +00:00
gingerBill
a705a2e38b Minor improvement to multi return value reducing stack usage 2022-11-13 22:55:32 +00:00
gingerBill
16fc961010 Begin work on map static set 2022-11-11 14:45:22 +00:00
gingerBill
1bcec3f769 Change map internal calls to use a pointer 2022-11-09 22:21:36 +00:00
gingerBill
a71daee545 Allow for -use-static-map-calls which generates a get procedure per map; add runtime.map_get 2022-11-08 14:58:05 +00:00
gingerBill
046dd55032 Change __dynamic_map_get signature 2022-11-08 13:02:32 +00:00
gingerBill
ed58374964 Make Map_Info store pointers to cell info rather than inline 2022-11-08 12:18:36 +00:00
gingerBill
810a1eee41 Remove the need for type->Map.internal_type and replace with the definition of runtime.Raw_Map 2022-11-08 11:13:46 +00:00
gingerBill
c96e0afbf1 Begin work on implementing the new map internals 2022-11-07 23:02:21 +00:00
gingerBill
4812601e78 Fix #2167 context.assertion_failure_proc = nil (context field assignments) 2022-11-01 12:56:17 +00:00
gingerBill
8fa571c283 Use direct parameter value in lb_find_ident when possible 2022-10-30 22:58:44 +00:00
gingerBill
0fe006157e Remove extra pointer indirection 2022-09-27 00:18:19 +01:00
gingerBill
4d208dc092 Override lbArgKind to be indirect for #by_ptr parameters 2022-09-27 00:10:05 +01:00
gingerBill
0dce7769f4 Clean up private internal constant global handling 2022-09-22 00:18:03 +01:00
gingerBill
ff97a73152 Reduce unnecessary map gets 2022-09-21 13:03:13 +01:00
gingerBill
7840c1b89f Change __dynamic_map_get and __dynamic_map_set to use separate parameters rather than take a singular struct 2022-09-17 12:48:12 +01:00
gingerBill
a3c04db828 Revert "Just get the value directly and store it in another global variable"
This reverts commit 190c3ab0cd.
2022-09-14 17:57:12 +01:00
gingerBill
190c3ab0cd Just get the value directly and store it in another global variable
// global
x := &Foo{}
2022-09-14 17:50:31 +01:00
gingerBill
0c9aaed9f7 Fix #2029 Eumerated array of procs literal crashes the compiler with an llvm error 2022-09-07 11:09:22 +01:00
gingerBill
aeacf3a9d8 Correct max alignment handling throughout the llvm backend 2022-08-24 13:07:41 +01:00
gingerBill
5337b0b471 Revert "Remove debug message"
This reverts commit 22d16c20f8.

Revert "Correct global constant procedure initialization"

This reverts commit 697c839c84.

Revert "Clean up how procedures are typed in LLVM's dumb type system"

This reverts commit de8bd88d2a.
2022-08-16 16:16:36 +01:00
gingerBill
d30198c99a Merge pull request #1944 from odin-lang/load-improvements
Improvements to `#load`
2022-08-15 10:27:53 +01:00
gingerBill
697c839c84 Correct global constant procedure initialization 2022-08-12 12:29:11 +01:00
gingerBill
de8bd88d2a Clean up how procedures are typed in LLVM's dumb type system 2022-08-12 11:15:12 +01:00
gingerBill
0f3562ef02 Improve compound literal generation for array-like types 2022-08-11 16:01:46 +01:00
gingerBill
03f683f9e7 Improve emit store for large constants 2022-08-11 15:19:27 +01:00
gingerBill
a7c3906003 #load(path, type)
where `type` can be `string` or `[]T` where `T` is a simple type
2022-08-11 14:30:14 +01:00
gingerBill
84f9fb706b General clean up of LLVM*GEP2 code 2022-08-10 11:36:25 +01:00
gingerBill
812823cad8 Wrap all LLVMGetElementType uses 2022-08-09 21:17:32 +01:00
gingerBill
cfc3723879 Remove other uses of LLVMGetElementType on pointer types 2022-08-09 21:12:31 +01:00
gingerBill
ff94c605e0 Minor change to lb_emit_store for storing nil to procedure variables 2022-08-09 18:08:30 +01:00
gingerBill
cb0a59bb2c Eliminate use of LLVMGetElementType for pointers 2022-08-09 15:36:18 +01:00
gingerBill
076700bd22 Merge pull request #1933 from lerno/reduce_reliance_on_ptr_type
Removed use of deprecated functions. Cleaned up most deprecated use o…
2022-08-09 15:18:09 +01:00
gingerBill
5e3cf45df3 Add #soa pointer type to aid with refactoring to #soa data types
a: #soa[16]Foo
p := &a[6]
#assert(type_of(p) == #soa^#soa[16]Foo)
p^.x = 123
p.x = 123
2022-08-08 15:07:00 +01:00
Christoffer Lerno
9c0a3b6c60 Removed use of deprecated functions. Cleaned up most deprecated use of LLVMGetElementType. 2022-08-07 19:26:28 +02:00
gingerBill
b28d4b753b Temp fix for lb_emit_store 2022-07-24 20:58:50 +01:00
gingerBill
e6ab4f4856 Force memset instead of store zeroinitializer when the value is large 2022-07-24 20:22:50 +01:00
gingerBill
c8ab1b7ee1 Add #by_ptr procedure attribute to enforce a parameter to be passed by pointer internally 2022-07-24 13:11:48 +01:00
gingerBill
6c7e5748a8 Integrate numerous debug fixes from #1877 2022-07-18 12:49:29 +01:00
gingerBill
e61b73d7ad Fix #1869 2022-07-16 22:30:57 +01:00
gingerBill
1676c643df Change MAX_STORE_SIZE 2022-06-30 15:47:19 +01:00
gingerBill
4d06a54c0c Use memmove if possible when emitting store over a certain size 2022-06-30 15:42:02 +01:00
gingerBill
5187db525f Minor style change 2022-06-12 17:17:59 +01:00
gingerBill
a8bd340267 Merge pull request #1395 from hdooley/master
factor out alloca generation into a helper
2022-06-12 17:17:12 +01:00
gingerBill
cec049b7d3 Make the link order of foreign imports deterministic 2022-05-04 16:04:26 +01:00