[llvm-reduce] Skip chunks that lead to broken modules.
Some reduction passes may create invalid IR. I am not aware of any use case where we would like to proceed reducing invalid IR. Various utils used here, including CloneModule, assume the module to clone is valid and crash otherwise. Ideally, no reduction pass would create invalid IR, but some currently do. ReduceInstructions can be fixed relatively easily (D86210), but others are harder. For example, ReduceBasicBlocks may remove result in invalid PHI nodes. For now, skip the chunks. If we get to the point where all reduction passes result in valid IR, we may want to turn this into an assertion. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D86212
Loading
Please sign in to comment