mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-24 04:20:13 +00:00
99fe61e724
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. |
||
---|---|---|
.. | ||
libspirv.h | ||
libspirv.hpp | ||
linker.hpp | ||
optimizer.hpp |