Seems the DCE optimization recorded all functions' names and prevented elimination of them (not sure anything was eliminated). I've fleshed out the pattern matching a bit and added tests. Could perhaps be cleaned up with Uniplate, but an improvement nonetheless.
Before:
$ wc -l examples/*.vim
575 examples/loop.vim
1464 examples/misc.vim
2039 total
Seems the DCE optimization recorded all functions' names and prevented elimination of them (not sure anything was eliminated). I've fleshed out the pattern matching a bit and added tests. Could perhaps be cleaned up with Uniplate, but an improvement nonetheless.
Before:
After: