File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -1289,7 +1289,21 @@ Error BugDriver::debugOptimizerCrash(const std::string &ID) {
1289
1289
1290
1290
EmitProgressBitcode (*Program, ID);
1291
1291
1292
- return DebugACrash (*this , TestForOptimizerCrash);
1292
+ auto Res = DebugACrash (*this , TestForOptimizerCrash);
1293
+ if (Res || DontReducePassList)
1294
+ return Res;
1295
+ // Try to reduce the pass list again. This covers additional cases
1296
+ // we failed to reduce earlier, because of more complex pass dependencies
1297
+ // triggering the crash.
1298
+ auto SecondRes = ReducePassList (*this ).reduceList (PassesToRun);
1299
+ if (Error E = SecondRes.takeError ())
1300
+ return E;
1301
+ outs () << " \n *** Found crashing pass"
1302
+ << (PassesToRun.size () == 1 ? " : " : " es: " )
1303
+ << getPassesString (PassesToRun) << ' \n ' ;
1304
+
1305
+ EmitProgressBitcode (getProgram (), " reduced-simplified" );
1306
+ return Res;
1293
1307
}
1294
1308
1295
1309
static bool TestForCodeGenCrash (const BugDriver &BD, Module *M) {
You can’t perform that action at this time.
0 commit comments