Commit Graph

338 Commits

Author SHA1 Message Date
gingerBill
8c943eb054 Make inline array arithmetic use load+extractvalue rather than getelementptr+load to give the optimizer a better hint for vectorization 2021-06-01 10:51:54 +01:00
gingerBill
446703ba75 Improves to array arithmetic on += etc assignment statements 2021-06-01 10:37:31 +01:00
gingerBill
2573da12fc Fix #992 2021-05-31 20:58:28 +01:00
gingerBill
bbc9c6a93c Fix #999 2021-05-31 20:56:07 +01:00
gingerBill
b8d6dd4eb7 Fix #1004 2021-05-31 20:38:10 +01:00
gingerBill
0f91ffe28f Add intrinsics.{ptr_offset, ptr_sub} 2021-05-30 13:21:56 +01:00
gingerBill
4b46d691f8 Improve logic for intrinsics.{mem_copy, mem_copy_non_overlapping, mem_zero} to use the *.inline LLVM variants when possible 2021-05-30 12:52:44 +01:00
gingerBill
bb7bd94b0a Fix comparison bug of enumerated arrays 2021-05-27 09:52:50 +01:00
gingerBill
4a886a1bc5 Disable copy elision on assignments for the time being 2021-05-25 15:43:34 +01:00
gingerBill
c21c754b6f Minimize copying on getting the address of a call if required 2021-05-24 23:51:01 +01:00
gingerBill
0c46d06e63 Add intrinsics.mem_zero 2021-05-24 22:39:27 +01:00
gingerBill
44b6e7c45d Move the mem zero into a separate procedure for reuse 2021-05-24 22:32:38 +01:00
gingerBill
284a2631fd Refactoring of lbFunctionType retrieval 2021-05-24 22:16:22 +01:00
gingerBill
3f156bcb4b Refactor backend code for assignments; Refactor some statements into separate procedures 2021-05-24 22:09:21 +01:00
gingerBill
d35a9e65b6 Heavily improve the copy elision logic in the backend 2021-05-24 20:57:44 +01:00
gingerBill
c440296ae8 Add @(link_section=<string>) for global variables 2021-05-24 15:41:22 +01:00
gingerBill
79f115d6a7 Handle #c_vararg correctly 2021-05-24 14:46:03 +01:00
gingerBill
b8f8d4c3a1 Modify ABI for the Odin calling conventions on SysV slightly 2021-05-22 11:33:08 +01:00
gingerBill
247f4f3293 Fix ..= logic in the backend 2021-05-21 10:51:19 +01:00
gingerBill
9c54ed5792 Add range-based error messages to -verbose-errors
Example:
Cannot convert '(1 + 2)' to 'untyped bool' from 'untyped integer'

	x := (1 + 2) * true;
	     ^~~~~~^
2021-05-19 14:15:57 +01:00
gingerBill
26ce40c188 Remove @(static) for global variables 2021-05-19 11:51:48 +01:00
gingerBill
b34e4a9fd1 More minor linkage changes 2021-05-19 11:46:27 +01:00
gingerBill
28561ef5f5 Minor change to internal linkage stuff 2021-05-19 11:26:05 +01:00
gingerBill
e82e4398b6 Add intrinsics.mem_copy and intrinsics.mem_copy_non_overlapping 2021-05-19 10:50:02 +01:00
gingerBill
e0225c3579 Add intrinsics.sqrt for floating-point values 2021-05-19 10:32:41 +01:00
gingerBill
6ef96d3300 Improve untyped to typed logic for aiding the backend 2021-05-16 14:44:02 +01:00
gingerBill
2e633f57a0 Add concrete type information for untyped values as procedure arguments 2021-05-16 13:00:16 +01:00
gingerBill
ce08e832f7 Allow ..= alongside .. as a "full range" operator; Update core:odin/parser etc 2021-05-16 12:34:35 +01:00
gingerBill
1cf6b6679d Add custom basic dead instruction elimination pass 2021-05-15 21:10:06 +01:00
gingerBill
7b7081d607 Remove old dead code 2021-05-15 18:59:54 +01:00
gingerBill
5ae564cc8c Add name to aggregate result pointer to procedures 2021-05-15 18:53:52 +01:00
gingerBill
f7b1290fe9 Change for i in x..y {} behaviour
Adds an extra check before incrementation to prevent the possibility of overflowing of `y` is at the limit maximum size of the integer
e.g. `for i in u8(0)..255 {}` (assuming `255` is not known at compile time)
2021-05-15 18:02:06 +01:00
gingerBill
b01c2e1017 Disallow slicing of constant values 2021-05-15 16:40:40 +01:00
gingerBill
63b54ce7c6 Add minor ignoring hint on type assertions to get better code generation with no optimizations enabled 2021-05-13 12:48:12 +01:00
gingerBill
2e5f57d8a1 Fix #741 2021-05-13 00:44:33 +01:00
gingerBill
d2fcbf0e1d Fix #948 2021-05-12 15:00:19 +01:00
gingerBill
d353f97f91 Add byval with align, sret attributes for SysV 2021-05-11 13:30:27 +01:00
gingerBill
e1c2528d87 Remove warning on \*nix 2021-05-11 12:29:27 +01:00
gingerBill
8ff80dec58 Minor change (in preparation for something else) to opt passes 2021-05-11 12:00:55 +01:00
gingerBill
9a4d942b0b Fix debug information for array types by setting the DISubrange 2021-05-10 21:29:25 +01:00
gingerBill
ff6fdc7812 Correct SysV ABI for -> (f32, bool) 2021-05-10 21:16:26 +01:00
gingerBill
da7a9a3584 Improve type inference rules for implicit selector expressions
New improvements:
`(.A == x)`
`a_union_containing_many_enums = .A;`
2021-05-06 13:59:05 +01:00
gingerBill
b6a1ec0229 Remove debug code 2021-05-05 23:34:53 +01:00
gingerBill
60685369b9 Fix typo 2021-05-05 23:34:39 +01:00
gingerBill
0f2a9e6143 Fix LLVM store point for nested types containing procedures (e.g. ^^proc()) 2021-05-05 23:00:12 +01:00
gingerBill
278de3a92f Unify AstTernaryExpr with AstTernaryIfExpr
Allow for both syntaxes `x if cond else y` and `cond ? x : y`
Removes the confusing semantics behind `?:` which could be `if` or `when` depending on the context.
2021-05-05 15:22:54 +01:00
gingerBill
579b317be8 Mark external thread local globals 2021-05-05 11:47:47 +01:00
gingerBill
08360e2337 Minor cleanup 2021-05-05 10:56:19 +01:00
gingerBill
94570a24c1 Move anonymous proc generation into lbGenerator 2021-05-04 00:56:29 +01:00
gingerBill
17001bf38c Nearly approach full functionality for -use-separate-modules coupled with multithreading 2021-05-04 00:45:09 +01:00