Insert plugin phases in the right place of the phase plan
Insert plugin phases in the right place of the phase plan
The scheduling makes sure the ordering constraints of plugin phases are satisfied. If the ordering constraints are unsatisfiable, an exception is thrown.
Note: this algorithm is factored out for unit test.