This patch adds calls to PowerPC-specific passes that can be safely skipped to opt-in to the optimization bisect mechanism.
I selected the passes to be skipped based on the fact that they were not added at CodeGenOpt::None in PPCTargetMachine.cpp. Based on that criteria, I did not add opt-in calls to the following passes, which appear to be required:
I also chose not to add the skip check to PPCCTRLoopsVerify, but I'm not certain about this one. This pass isn't run at -O0, so it meets the normal criteria for skipping, but since it is a verification function I decided not to add the skip check. If this is verifying that transformations were performed in PPCCTRLoops, which can be skipped, then there is a potential problem. If, on the other hand, it is simply verifying that the IR is legal following PPCCTRLoops then it should be fine to not skip it.
Note that the call to skipFunction() will also check for the "optnone" function attribute, so this can theoretically result in passes being skipped even when optimization bisect is not being done. However, I believe that any pass that can be safely skipped should be skipped for functions with the optnone attribute.
See D19172 for details on the base optimizaton bisect implementation.