spirv-stats - a tool to output statistics of your SPIR-V shader modules

I’ve just released a small one C++ file tool called spirv-stats. It will take one or more SPIR-V input files, and calculate the composition of the SPIR-V shader modules like so: It firstly outputs the total number of hits in the SPIR-V shader module(s) - this is the total number of opcodes found within the module(s). Then it outputs the total byte size of the module(s), followed by a sorted breakdown of the module(s), with the most hit opcodes coming first.

Adding type identifiers (MPC -> LLVM for the Neil Language #3)

In my previous post cleaning up the parser, I had rationalised the parser for my custom language I’m calling Neil - Not Exactly an Intermediate Language. The next step in making my language more useful and expression is to add the ability to arbitrarily create variables within a function, store an initial value to the variable, and then be able to update the variable. Previously, our language could handle: Whereas now we want it to be able to handle:

json.h update - fixing bugs found by nativejson-benchmark

I was recently made aware of the awesome JSON parser/writer benchmark suite nativejson-benchmark (thanks to the awesome @chadaustin). The suite takes over 40 different JSON libraries and compares how fast the can parse/write JSON, but also has a set of test cases that cover some really obtuse corner cases that a lot of parsers missed. One of the parsers that failed some of these tests was my own one json.h, so in pull request #42 I’ve merged in the fixes for the failures uncovered by the test suite.

Cleaning up the parser (MPC -> LLVM for the Neil Language #2)

In my previous post Hooking up MPC & LLVM I had started hooking up MPC to LLVM, to start developing a custom language I’m calling Neil - Not Exactly an Intermediate Language. Since then, I’ve tried to rationalise the various hacks I had to do on the original version just to get something working, and actually try and have a clean codebase for generating LLVM from our MPC grammar. Check out the GitHub repository here if you want to follow the progress.

Hooking up MPC & LLVM

I’ve been tinkering around with mpc and llvm recently - just to satisfy a few simple questions: How easy is it to use mpc? How easy is the LLVM c api to use? How easy is it to connect a parser generator to an LLVM Module? So given the above aims, I’ve embarked on creating my own stupid little language, that I’m calling ‘neil‘ - Not Exactly an Intermediate Language. It is utterly by chance that the name ‘neil‘ happens to be my own name, if you’ve believe that gratuitous lie!