Patch: refactor some utilities from opt.cpp into OptUtils.h/cpp

Another patch in the general direction of

Separates some utility functions from opt.cpp into a separate module, currently still within tools/opt. The idea is to enable custom opt-like tools to use this functionality without duplicating too much of the code in opt.cpp

No functionality change.


refactor-optutils.1.patch (14.9 KB)