Add an OptimizedMandatoryCombine pass variant.

It's against the principles of pass design to check the driver mode
within the pass. A pass always needs to do the same thing regardless
of where it runs in the pass pipeline. It also needs to be possible to
test passes in isolation.
This commit is contained in:
Andrew Trick
2020-12-31 21:25:30 -08:00
parent ab42f753f7
commit cead6a5122
4 changed files with 23 additions and 12 deletions

View File

@@ -357,6 +357,8 @@ PASS(ForEachLoopUnroll, "for-each-loop-unroll",
"Unroll forEach loops over array literals")
PASS(MandatoryCombine, "mandatory-combine",
"Perform mandatory peephole combines")
PASS(OptimizedMandatoryCombine, "optimized-mandatory-combine",
"Perform -O level mandatory peephole combines")
PASS(BugReducerTester, "bug-reducer-tester",
"sil-bug-reducer Tool Testing by Asserting on a Sentinel Function")
PASS(OptRemarkGenerator, "sil-opt-remark-generator",