fuzzilli
fuzzilli copied to clipboard
Evaluate adding a Minimizer to remove redundant Instructions
After commit https://github.com/googleprojectzero/fuzzilli/commit/87ee22bad2ac3bafbc8db13d5bfb7ea3c25fc39c we are now able to determine whether an instruction can be replaced (folded) with an existing one. This would allow implementing a simple minimization pass which eliminates redundant LoadX
instructions from the code (essentially a minimal version of common subexpression elimination).
It's unclear if this is worth the effort. Currently, the CodeGenerators already deduplicate builtins, integers, and floats using the ProgramBuilder.reuseOrLoadX
APIs, which might already be good enough. On the other hand, code generated by the FuzzIL compiler may benefit from such a minimization pass.