- /** Applies optimizations to a stage. The return value indicates if the
- preceding stage should be processed again. */
- bool optimize(Stage &);
+ bool validate(Stage &);
+
+ /** Applies optimizations to a stage. The return value indicates which
+ stage should be optimized next. */
+ OptimizeResult optimize(Stage &);