Commit Graph

49 Commits

Author SHA1 Message Date
khyperia
6323fc609f Fix mem2reg bugs 2020-10-08 15:30:35 +02:00
khyperia
c627407966 fuse_trivial_branches and remove_nops 2020-10-08 11:11:43 +02:00
khyperia
45736613a3 Fix tests 2020-10-08 10:40:18 +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
3a44679729 Properly implement all the hacks I did to get hello-world-triangle working 2020-10-04 16:23:09 +02:00
khyperia
16338fb079 remove duplicate extensions 2020-10-01 12:46:02 +02:00
khyperia
b0c9965cfb Implement dead code elimination in the linker 2020-10-01 12:43:52 +02:00
khyperia
4f10b5ffe8 Import rspirv types in linker
This makes the linker match the import style of rustc_codegen_spirv
2020-10-01 12:18:19 +02:00
khyperia
28c0885b40 Take annotations into account when merging types 2020-10-01 11:08:12 +02:00
khyperia
98dfc0cf5e The max_bound pass isn't needed. 2020-09-30 15:50:38 +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
8e35a22248 Add some docs, and remove sort_globals which isn't needed anymore. 2020-09-28 11:12:26 +02:00
khyperia
7e7055ab1a Move finalizing_passes.rs to linker 2020-09-28 10:40:56 +02:00
khyperia
a91fd92778 Replace complex kill_with with a simple Vec::retain
kill_with was also reordering instructions, which in general, should
preferably never be done - declaration order in spir-v is important
enough to try to adhere to that rule.
2020-09-28 10:31:16 +02:00
khyperia
8f800c5755 Split linker into lots of files 2020-09-28 10:02:21 +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
3821aa2060 Add support for spirv v1.3 2020-09-24 18:20:46 +02:00
khyperia
336f040299 Remove forgotten println statements 2020-09-23 10:11:17 +02:00
khyperia
9f6ee7a217 Properly rewrite memory semantics and scopes in the deduplicator 2020-09-23 10:08:19 +02:00
khyperia
66e0730648 Fix remove_duplicate_ext_inst_imports to rewrite OpExtInsts too 2020-09-22 21:12:13 +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
f9d57a01b6 Fix various linker typos and bugs 2020-09-22 19:06:43 +02:00
khyperia
d4c4834fd6 (badly) implement OpTypeForwardPointer deduplication 2020-09-22 18:25:48 +02:00
khyperia
206af9d2a1 Refactor remove_duplicate_types to be a lil cleaner 2020-09-22 18:19:33 +02:00
khyperia
abdfa35cce Document the remove_duplicate_types functioin 2020-09-22 17:41:57 +02:00
khyperia
a3f859afa5 Simplify remove_duplicate_types 2020-09-22 17:26:17 +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
Jasper Bekkers
7e1e753c59
Fix clippy warnings 2020-09-22 09:11:02 +02:00
Jasper Bekkers
3eaa45cc52
Fmt 2020-09-22 09:00:14 +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
Jasper Bekkers
3bba335477
Add binary back 2020-09-14 12:18:04 +01:00
khyperia
c5dfee6e1e Start work on integrating linker 2020-09-11 13:09:06 +02:00
Jasper Bekkers
0c64a5eb33
Proper type checking 2020-09-04 15:35:04 +01:00
Jasper Bekkers
470c2ff2e2
Test case for OpGroupDecorate 2020-09-04 15:35:03 +01:00
Jasper Bekkers
92feaf36f0
Enable test func_ctrl 2020-09-04 15:35:03 +01:00
Jasper Bekkers
9cdf751643
Add another failing testcase 2020-09-03 18:00:38 +01:00
Jasper Bekkers
cc77d911d3
Add a bunch of test cases from spirv-linker and bug fixes to make these test cases work 2020-09-03 17:58:52 +01:00
Jasper Bekkers
733008a993
Add some tests 2020-09-03 17:58:51 +01:00
Jasper Bekkers
1f4a2d0eb0
Add spirv header 2020-09-03 17:58:51 +01:00
Jasper Bekkers
8a71903c2e
Formatting 2020-09-02 15:16:13 +01:00
Jasper Bekkers
dfb0db67a0
Compact ids 2020-09-02 14:11:42 +01:00
Jasper Bekkers
e08ad8ca4e
Drop linkage related OpDecorates, import functions/variables and OpCapability Linkage 2020-09-02 14:11:42 +01:00
Jasper Bekkers
65dd2f1149
Cleanup import/export pair matching, strip annotations for imports and replace all uses of imported symbol with the exported symbol 2020-09-02 14:11:41 +01:00
Jasper Bekkers
f11a49619a
Check for import/export type matches 2020-09-02 14:11:41 +01:00
Jasper Bekkers
52084da4b0
Basic steps on linker 2020-09-01 22:58:26 +01:00