If you really want to use this janky code:
$ git clone https://github.com/riscv/riscv-opcodes
$ # You need like a patch to fix extension handling... might submit PR in a bit
$ python3 parse.py rv_* rv64_*
$ yaml2json < instr_dict.yaml > instr_dict.json # Sorry
$ python3 free-space.py
Summary:
Total of 84.42% RISC-V encoding space is used
... 73.51% is RVC
... 10.91% is 32-bit instructions
43.63% of >= 32-bit encoding is used