Commit Graph

206 Commits

Author SHA1 Message Date
khyperia
c04ac95860 Make spirv_std be a system crate (i.e. zombieable)
This fixes windows CI, because when testing the spirv-std crate, the
memcmp defined here would override the normal memcmp, causing the inf
loop to be hit.
2020-10-12 16:56:14 +02:00
khyperia
aba452e430 Catch pointercasts that are actually struct_geps 2020-10-10 14:33:14 +02:00
khyperia
bc1358e787 Fix issue with is_system_crate
This didn't get tested locally due to weird caching stuff, so, fixing CI
here.
2020-10-10 14:21:33 +02:00
khyperia
01ccf5cf39 Zombies are errors in user code 2020-10-10 13:53:33 +02:00
khyperia
e56c35aaf3 Docs, and fix clippy issues 2020-10-10 13:04:18 +02:00
khyperia
69ecc92ba4 Enable spirv-val by default 2020-10-10 12:37:59 +02:00
khyperia
8d3101e81e Change the default shader mode to shader 2020-10-10 12:34:48 +02:00
khyperia
1516d864f3 First try at spirv-builder 2020-10-09 17:22:07 +02:00
khyperia
6323fc609f Fix mem2reg bugs 2020-10-08 15:30:35 +02:00
khyperia
ab100e1904 Move SPIRV_VAL to post-link 2020-10-08 13:44:26 +02:00
khyperia
3c1b45a45b rustup update 2020-10-08 10:51:04 +02:00
khyperia
b94de84cb8 Add mem2reg 2020-10-08 10:26:19 +02:00
khyperia
20cd6507c1 Write our own inliner 2020-10-07 12:39:58 +02:00
khyperia
87329d5add Properly implement memset dynamic size 2020-10-05 17:04:12 +02:00
khyperia
5057dfc144 rustup update 2020-10-05 11:51:30 +02:00
khyperia
3a44679729 Properly implement all the hacks I did to get hello-world-triangle working 2020-10-04 16:23:09 +02:00
khyperia
8854fa575b Zombie primitives if their capabilities aren't there 2020-10-01 11:59:47 +02:00
khyperia
2c1b73ab9a Zombie branches before structurizer is done 2020-09-30 16:02:40 +02:00
khyperia
127cc1bb99 really_unsafe_ignore_bitcasts 2020-09-30 15:50:38 +02:00
Jake Shadle
13c7530a1a
Add basic CI (#40) 2020-09-29 18:00:57 +02:00
khyperia
c464caf088 Add -C target-feature=+shader support
Eventually shaders will be the default and -C target-feature=+kernel
will be a thing, but, not right now due to shaders being borked
2020-09-29 15:35:08 +02:00
khyperia
eaf350d2a8 Optimize a little bit of kill_linkage_instructions that I forgot, which reduces time by another 2-3x
Also add various other timers, and use the helpful timer() function
2020-09-29 13:04:55 +02:00
khyperia
9bd7db20df Significantly refactor import_export_link to improve its speed by 12x 2020-09-28 16:29:26 +02:00
khyperia
8f1d69848f Add timers to compiler and linker 2020-09-28 14:51:04 +02:00
khyperia
df3da15f0b -C codegen-units isn't needed anymore 2020-09-28 13:48:33 +02:00
khyperia
3f3672eaa9 Add build_libcore_test to cargo test
Also delete extremely outdated test/lib.rs file.
2020-09-28 13:09:38 +02:00
khyperia
7e7055ab1a Move finalizing_passes.rs to linker 2020-09-28 10:40:56 +02:00
khyperia
c8712a9047 Add in some capability stuff
Also make env var checks runtime, not compiletime.
2020-09-26 15:32:18 +02:00
khyperia
46c2b2bda2 Clean up run_libcore_test and try to get it to work 2020-09-25 13:42:44 +02:00
khyperia
4e79b4e824 intel-compute-runtime doesn't support i8 or i16 atomics 2020-09-25 11:35:13 +02:00
khyperia
01a831e508 intel-compute-runtime doesn't like OpLogicalNot 2020-09-25 11:22:55 +02:00
khyperia
7b45f88052 OpAccessChain on structs should take u32 2020-09-24 18:31:19 +02:00
khyperia
3821aa2060 Add support for spirv v1.3 2020-09-24 18:20:46 +02:00
khyperia
3e569e3a32 Add run_libcore_test 2020-09-24 13:12:34 +02:00
khyperia
90e539fc26 declared_values isn't needed now that the DeclareMethods trait is gone 2020-09-23 10:48:41 +02:00
khyperia
01845cf930 use bimaps, they're neat! 2020-09-23 10:39:51 +02:00
khyperia
1921ecc4a1 Fix up constants accidentally being emitted inside functions 2020-09-23 10:16:18 +02:00
khyperia
0546f521d8 Fix up zombie export with temp hack
This is to get ID rewrite passes to understand zombie exports (e.g. the
ID offsetter)
2020-09-22 20:24:54 +02:00
khyperia
31e8d95898 RPO alg already deletes dead blocks 2020-09-22 16:02:36 +02:00
khyperia
cc916c784e Documentation, code shuffling, and RPO block sorting 2020-09-22 15:51:30 +02:00
khyperia
1b3e5230da Disable opaque type naming for now 2020-09-22 13:53:58 +02:00
khyperia
0b5a02def0 Print full types to figure out errors better 2020-09-22 13:35:43 +02:00
khyperia
ec49140058 Move zombie pass to linker 2020-09-22 12:59:23 +02:00
khyperia
82b596cb97 rustup update 2020-09-22 09:15:08 +02:00
khyperia
4140589ca7 Link globals 2020-09-21 15:38:20 +02:00
khyperia
11fcf56935 Re-add things that shouldn't have been removed 2020-09-21 15:38:06 +02:00
khyperia
ebff8a8f39 Write some docs 2020-09-21 14:49:05 +02:00
khyperia
78f7d8f91c Interfaces and kernel entry points 2020-09-21 11:23:23 +02:00
khyperia
d212f489a1 Remove intrinsics now handled by rustc_codegen_ssa 2020-09-21 09:59:55 +02:00
khyperia
6da1ac5474 rustup update 2020-09-21 09:37:31 +02:00
khyperia
bc003cf6a2 Apparently I pseudo-ADHD'd away from this comment in the middle of writing it and never came back to finish it 2020-09-18 09:56:23 +02:00
Jasper Bekkers
9697c22740
Linker perf (#33)
* Improve linker performance - this should loop over data significantly less

* Remove Rc and RefCell because they weren't needed in the end

* Moved some code into a DefUseAnalyer

* Point to same rspirv

* Link to rspirv git instead of locally
2020-09-17 10:55:44 +02:00
khyperia
85e7a6a951 Caching constant system 2020-09-16 17:32:21 +02:00
khyperia
0a2629ef13 Documentation! 2020-09-16 16:08:08 +02:00
khyperia
213db43d68 Remove all references to wasm 2020-09-16 14:18:10 +02:00
khyperia
c2996046ed Split codegen_cx.rs into modules 2020-09-16 10:50:57 +02:00
khyperia
4e3f1db15a Add entry attribute 2020-09-15 17:17:48 +02:00
khyperia
24e03a5c0b Extract spirv attribute parsing to its own function 2020-09-15 16:11:53 +02:00
khyperia
fd1471066d right! non-cdylibs dylibs exist. neat! 2020-09-15 16:03:26 +02:00
khyperia
d6a1e0372f Pass through inline attribute 2020-09-15 15:32:40 +02:00
khyperia
2a66153840 Add spirv-std crate 2020-09-15 15:17:27 +02:00
khyperia
b345d519bf Add storage class attribute 2020-09-15 14:42:39 +02:00
khyperia
ec6608f1b5 Export zombie link information
To support the linker being able to do zombie shenans
2020-09-15 10:55:15 +02:00
khyperia
2b1e8a26df rustup update 2020-09-14 15:09:43 +02:00
khyperia
3a895f80b2 Rename poison to zombie
Poison means something else in compilers: https://llvm.org/docs/LangRef.html#poison-values
2020-09-14 15:01:13 +02:00
khyperia
ede5a1ab7f Poison reason tracking 2020-09-14 15:01:13 +02:00
khyperia
31ac70ea07 Don't use xargo 2020-09-14 15:01:13 +02:00
khyperia
e26d1a7616 Fix the horrible no-good very bad u32 sub linkage 2020-09-11 16:08:01 +02:00
khyperia
c5dfee6e1e Start work on integrating linker 2020-09-11 13:09:06 +02:00
khyperia
07bf66cb8f OpenCL intrinsics 2020-09-10 16:58:19 +02:00
khyperia
c1134788cd Sort blocks topologically
Also lots of spirv-val work
2020-09-10 16:37:12 +02:00
khyperia
89065c1db0 Deal with a bunch of spirv-val issues 2020-09-09 18:24:02 +02:00
khyperia
575490b25e Start work on making spirv-val pass 2020-09-09 15:20:11 +02:00
khyperia
a7603597a4 Prettier function names 2020-09-09 14:39:51 +02:00
khyperia
7a5aa3b241 Poison system 2020-09-09 14:17:26 +02:00
khyperia
3a20252b4c spirv-val 2020-09-09 12:37:24 +02:00
khyperia
b560d5e0b1 Make modules reparseable
Mostly by handling u128
2020-09-09 12:25:57 +02:00
khyperia
ac53d9395e libcore compiles, drop some printlns 2020-09-08 17:33:17 +02:00
khyperia
913e19f696 Extension instructions 2020-09-08 16:21:55 +02:00
khyperia
3a9d6f87ca Fix up some integer weirdness 2020-09-07 18:53:32 +02:00
khyperia
e9d9be316a Get final emit steps working 2020-09-07 18:03:11 +02:00
khyperia
7591e582d9 Remove spv lifetime
Turns out it wasn't actually needed, doh
2020-09-07 15:55:39 +02:00
khyperia
9d9d418979 Move intrinsics to their own file 2020-09-07 15:45:46 +02:00
khyperia
148f7ba163 Do some atomics 2020-09-07 15:26:34 +02:00
khyperia
81f868d4ec Fix up Option<&u8> constant 2020-09-07 14:24:23 +02:00
khyperia
f557e5b54f Add some intrinsics 2020-09-07 11:45:05 +02:00
khyperia
3bfc0289d6 rustup update 2020-09-07 10:55:14 +02:00
khyperia
c5cf6d089b Handle recursive pointer types 2020-09-07 10:31:16 +02:00
khyperia
cd9e372ddb Refactor scalar type translation 2020-09-07 09:49:53 +02:00
khyperia
85601dec70 Start work on the surprisingly difficult task of recursive types 2020-09-04 14:14:23 +02:00
khyperia
e177eeed11 Always try to figure out the full type. 2020-09-03 18:01:38 +02:00
khyperia
9ec911930c Fix up a few little things 2020-09-03 16:49:18 +02:00
khyperia
a8fc001e4c SpirvValue::alignof 2020-09-03 16:15:02 +02:00
khyperia
194e337da3 Split SpirvType into its own file 2020-09-03 15:39:25 +02:00
khyperia
04b4f8aa88 Start implementing proper constants
Also rework ADTs to store their size
2020-09-03 15:35:54 +02:00
khyperia
582258a873 Even more intrinsics 2020-09-02 17:53:01 +02:00
khyperia
b6d2c0972b 64 bit switches 2020-09-02 17:53:01 +02:00
khyperia
82292799b6 Implement a bunch of stuff 2020-09-02 14:00:55 +02:00
khyperia
e31ea83852 Delete old scripts no longer used 2020-09-01 16:44:51 +02:00
khyperia
902bf36105 Implement a bunch of type stuff
Also fix a particularly nasty thing, pointed out with the WARN comment,
that I missed when reading the codegen_llvm code.
2020-09-01 16:42:29 +02:00