Scheduling of machine passes


I have a question about the execution order of machine passes:

I have written 2 machine function passes. The first is read-only ( analysisUsage.setPreservesAll() ). The second depends on the first and modifies the program based on the results of the first one ( analysisUsage.setPreservesCFG() ). I would appreciate it if the program did not change between those 2.

Can I assume that the pass manager does not insert any other modification passes in front of my modification pass?

Best regards,


Nevermind, I think this is exactly why passes may require passes. A modification pass would invalidate the program and must therefore not be placed between a required pass and the pass that requires it.