SPIRV-Tools/include/spirv-tools
Diego Novillo 99fe61e724 Add API to create passes out of a list of command-line flags.
This re-implements the -Oconfig=<file> flag to use a new API that takes
a list of command-line flags representing optimization passes.

This moves the processing of flags that create new optimization passes
out of spirv-opt and into the library API.  Useful for other tools that
want to incorporate a facility similar to -Oconfig.

The main changes are:

1- Add a new public function Optimizer::RegisterPassesFromFlags. This
   takes a vector of strings.  Each string is assumed to have the form
   '--pass_name[=pass_args]'.  It creates and registers into the pass
   manager all the passes specified in the vector.  Each pass is
   validated internally.  Failure to create a pass instance causes the
   function to return false and a diagnostic is emitted to the
   registered message consumer.

2- Re-implements -Oconfig in spirv-opt to use the new API.
2018-07-27 15:10:08 -04:00
..
libspirv.h Add option to skip verifying block layout 2018-07-11 18:00:54 -04:00
libspirv.hpp Add option to skip verifying block layout 2018-07-11 18:00:54 -04:00
linker.hpp linker: Allow modules to be partially linked 2018-02-27 12:21:13 -05:00
optimizer.hpp Add API to create passes out of a list of command-line flags. 2018-07-27 15:10:08 -04:00