Laytan Laats
e3e04ffa22
llvm-18: enable sroa and static map calls
2024-05-07 16:52:46 +02:00
Laytan Laats
bb58926b7a
llvm 18: general unix and darwin specifics
2024-05-07 16:52:46 +02:00
Laytan Laats
25f1d0906d
compiler: improve target features support
2024-05-02 00:59:52 +02:00
gingerBill
2416380f34
Enforce as global constant
2024-04-18 12:56:18 +01:00
Laytan Laats
9647cb74ad
debug info fixes/refactor
...
This fixes (on my end) #3340 , #3117 , #2945 , #2922 , and #2762
A general refactor of debug info generation in order to fix issues and
increase stability.
What I believe is the root cause of a bunch of issues is that we use the
temporary metadata/forward declarations too much (/ hold onto them for
too long). It seems to cause problems with the reference counting inside
LLVM.
This PR reduces the use of these forward declarations to a minimum, it
creates it, fills in the fields, and resolves it, instead of waiting
until the end of generating code.
Some smaller issues I came across have also been solved.
2024-04-01 16:28:44 +02:00
gingerBill
433109ff52
Replace gb_exit(1) with exit_with_errors() where appropriate
2024-03-19 16:29:45 +00:00
gingerBill
9a2fc6cf4c
Serialize errors to make them sortable, deterministic, and generally more control
2024-03-19 15:34:29 +00:00
avanspector
5d6b4eda1e
Merge branch 'odin-lang:master' into haiku
2024-02-29 03:16:04 +01:00
gingerBill
5107bdc06b
Make lb_type_info use a procedure to load the global value
2024-02-27 15:45:53 +00:00
gingerBill
c6ee025063
Add type info generation for bit_field
2024-02-27 15:27:51 +00:00
gingerBill
826cf1508b
Remove __$startup_type_info procedure
2024-02-27 15:09:33 +00:00
gingerBill
51edf01162
Change type info table to be initializable constantly
...
[]Type_Info -> []^Type_Info
2024-02-27 15:07:55 +00:00
avanspector
0a6673220b
Merge branch 'haiku' of https://github.com/avanspector/Odin into haiku
2024-02-25 02:24:58 +01:00
avanspector
88add0b6b1
Improve Haiku support
2024-02-25 02:24:52 +01:00
gingerBill
a4b8c1ea17
Begin work adding bit_field
2024-02-22 15:55:54 +00:00
gingerBill
abaa906f34
Fix lb_hasher_proc_for_type
2024-02-07 11:05:38 +00:00
gingerBill
cec08114fd
Mock out comments
2024-02-02 14:57:22 +00:00
codename-irvin
76f52dd6c9
Add freestanding aarch64 target
2024-01-15 19:49:34 -05:00
gingerBill
f4782157d3
Implement instrumentation pass
2024-01-07 21:34:44 +00:00
Yawning Angel
cd65a15d81
src: enable_target_feature should add features, not overwrite
...
`llvm_features` being empty is the default state, and implies the
presence of certain features.
Previously if any target features were explicitly enabled by the
`enable_target_feature` attribute, they were added comma separated
to `llvm_features`.
For example: `lzcnt,popcnt,...,sse4.2,sse`
This was causing LLVM to try to target a CPU that *ONLY* has the
explicitly enabled features. This now will prefix explicitly enabled
features with a `+`, and preserve the existing `llvm_features` string
by appending to it if it is set.
2024-01-07 20:04:40 +09:00
gingerBill
feba52002e
Reduce repetition on initializing global type info member arrays
2023-12-13 17:46:00 +00:00
Jeroen van Rijn
c5c46c5073
Silence writable string warnings when compiling Odin on Linux.
2023-12-03 18:08:18 +01:00
Jeroen van Rijn
f903951016
Facored out get_default_microarchitecture
...
Moved `generic` -> `x86-64-v2` selection into its own procedure so that `llvm_backend.cpp` and `main.cpp` can share the same logic.
2023-11-10 20:14:00 +01:00
Jeroen van Rijn
e19460cbd7
Add -microarch:?
2023-11-10 19:37:08 +01:00
Laytan
9b68671082
Fix empty pass because of trailing comma
2023-10-31 19:29:54 +01:00
gingerBill
b7af4e7f6b
Explicitly write out the passes for each level and remove certain passes
2023-10-30 12:31:24 +00:00
gingerBill
61ad2a1345
TEST: Add sroa passes back
2023-10-29 20:45:19 +00:00
gingerBill
f54a026acc
Remove trailing comma
2023-10-29 20:33:29 +00:00
gingerBill
fc06d7011d
Use default passes without coro, openmp, and sroa passes
2023-10-29 20:31:53 +00:00
gingerBill
ed7c9ec619
Test: use custom passes for -o:speed
2023-10-29 20:13:03 +00:00
gingerBill
034aead930
Only make static map get calls inlineable outside of debug builds
2023-10-27 14:55:54 +01:00
gingerBill
c8a5bafc6b
Fix static map calls and default to them!
2023-10-27 14:53:48 +01:00
gingerBill
bc0fa1240b
Disable using giant packed struct for type info table for the time being
2023-10-27 13:03:21 +01:00
jcmdln
bd86cb22e0
Support LLVM >=17.0.1 on Darwin and Linux
2023-10-11 21:06:42 -04:00
gingerBill
c529b1b73a
Generate the global type info member values even if the count is 0
2023-09-27 11:44:29 +01:00
gingerBill
61f39ae0a0
Use a giant packed struct working for type info table
2023-09-22 15:32:32 +01:00
gingerBill
082324d7b9
Begin work on making the type info table be constantly initialized
2023-09-22 14:39:51 +01:00
gingerBill
5e99289d7a
Minor clean up
2023-09-22 12:11:39 +01:00
gingerBill
ac43dd0777
Remove debug text
2023-09-21 17:08:45 +01:00
gingerBill
963559676e
Fix build times for -o:<string> in LLVM-17
2023-09-21 16:48:00 +01:00
gingerBill
20ce8c4c51
Allow for zero passes
2023-09-21 12:45:11 +01:00
gingerBill
735bb147e2
Add asan lib for Windows
2023-09-21 11:03:25 +01:00
gingerBill
7a511308ef
Re-configure the new pass system
2023-09-21 10:54:02 +01:00
gingerBill
e82b0ea4cd
Add -o:aggressive for LLVM 17
2023-09-21 09:48:53 +01:00
gingerBill
2160484b62
Support -sanitize:<string> for address, memory, thread for LLVM 17
2023-09-21 09:40:33 +01:00
gingerBill
f0ab58dfbb
Begin work with adding the new pass system
2023-09-20 10:39:48 +01:00
gingerBill
e748d2f2af
Update to LLVM-17
2023-09-19 16:15:26 +01:00
gingerBill
15033eab28
Fix comparison of two nil unions against each other
2023-08-16 11:52:40 +01:00
Laytan Laats
3cce972125
fix indentation
2023-07-11 19:34:59 +02:00
Laytan Laats
52700d6a84
use lb_emit_select instead of lb_emit_if for exit check
2023-07-11 19:30:44 +02:00