Lines Matching refs:BD

47     BugDriver &BD;  member in llvm::ReducePassList
49 ReducePassList(BugDriver &bd) : BD(bd) {} in ReducePassList()
71 if (BD.runPasses(BD.getProgram(), Prefix, PfxOutput)) in doTest()
75 OrigProgram = BD.Program; in doTest()
77 BD.Program = ParseInputFile(PrefixOutput.str(), BD.getContext()); in doTest()
78 if (BD.Program == 0) { in doTest()
79 errs() << BD.getToolName() << ": Error reading bitcode file '" in doTest()
89 if (BD.runPasses(BD.getProgram(), Suffix)) { in doTest()
96 delete BD.Program; in doTest()
97 BD.Program = OrigProgram; in doTest()
108 BugDriver &BD; member in __anon19ca15e50211::ReduceCrashingGlobalVariables
113 : BD(bd), TestFn(testFn) {} in ReduceCrashingGlobalVariables()
134 Module *M = CloneModule(BD.getProgram(), VMap); in TestGlobalVariables()
159 if (TestFn(BD, M)) { in TestGlobalVariables()
160 BD.setNewProgram(M); // It crashed, keep the trimmed version... in TestGlobalVariables()
178 BugDriver &BD; member in llvm::ReduceCrashingFunctions
183 : BD(bd), TestFn(testFn) {} in ReduceCrashingFunctions()
203 BD.getProgram()->getFunction("main")) == Funcs.end()) in TestFuncs()
208 Module *M = CloneModule(BD.getProgram(), VMap); in TestFuncs()
231 if (TestFn(BD, M)) { in TestFuncs()
232 BD.setNewProgram(M); // It crashed, keep the trimmed version... in TestFuncs()
251 BugDriver &BD; member in __anon19ca15e50311::ReduceCrashingBlocks
256 : BD(bd), TestFn(testFn) {} in ReduceCrashingBlocks()
275 Module *M = CloneModule(BD.getProgram(), VMap); in TestBlocks()
326 Module *New = BD.runPassesOn(M, Passes); in TestBlocks()
335 if (TestFn(BD, M)) { in TestBlocks()
336 BD.setNewProgram(M); // It crashed, keep the trimmed version... in TestBlocks()
360 BugDriver &BD; member in __anon19ca15e50411::ReduceCrashingInstructions
365 : BD(bd), TestFn(testFn) {} in ReduceCrashingInstructions()
385 Module *M = CloneModule(BD.getProgram(), VMap); in TestInsts()
417 if (TestFn(BD, M)) { in TestInsts()
418 BD.setNewProgram(M); // It crashed, keep the trimmed version... in TestInsts()
435 static bool DebugACrash(BugDriver &BD, in DebugACrash() argument
441 BD.getProgram()->global_begin() != BD.getProgram()->global_end()) { in DebugACrash()
444 Module *M = CloneModule(BD.getProgram()); in DebugACrash()
461 if (TestFn(BD, M)) { // Still crashes? in DebugACrash()
462 BD.setNewProgram(M); in DebugACrash()
470 for (Module::global_iterator I = BD.getProgram()->global_begin(), in DebugACrash()
471 E = BD.getProgram()->global_end(); I != E; ++I) in DebugACrash()
480 ReduceCrashingGlobalVariables(BD, TestFn).reduceList(GVs, Error); in DebugACrash()
485 BD.EmitProgressBitcode(BD.getProgram(), "reduced-global-variables"); in DebugACrash()
493 for (Module::iterator I = BD.getProgram()->begin(), in DebugACrash()
494 E = BD.getProgram()->end(); I != E; ++I) in DebugACrash()
503 ReduceCrashingFunctions(BD, TestFn).reduceList(Functions, Error); in DebugACrash()
506 BD.EmitProgressBitcode(BD.getProgram(), "reduced-function"); in DebugACrash()
516 for (Module::const_iterator I = BD.getProgram()->begin(), in DebugACrash()
517 E = BD.getProgram()->end(); I != E; ++I) in DebugACrash()
521 ReduceCrashingBlocks(BD, TestFn).reduceList(Blocks, Error); in DebugACrash()
523 BD.EmitProgressBitcode(BD.getProgram(), "reduced-blocks"); in DebugACrash()
530 for (Module::const_iterator MI = BD.getProgram()->begin(), in DebugACrash()
531 ME = BD.getProgram()->end(); MI != ME; ++MI) in DebugACrash()
539 ReduceCrashingInstructions(BD, TestFn).reduceList(Insts, Error); in DebugACrash()
565 for (Module::const_iterator FI = BD.getProgram()->begin(), in DebugACrash()
566 E = BD.getProgram()->end(); FI != E; ++FI) in DebugACrash()
578 Module *M = BD.deleteInstructionFromProgram(I, Simplification); in DebugACrash()
581 if (TestFn(BD, M)) { in DebugACrash()
584 BD.setNewProgram(M); in DebugACrash()
605 Module *M = CloneModule(BD.getProgram()); in DebugACrash()
606 M = BD.performFinalCleanups(M, true); in DebugACrash()
609 if (TestFn(BD, M)) { in DebugACrash()
610 BD.setNewProgram(M); // Yup, it does, keep the reduced version... in DebugACrash()
616 BD.EmitProgressBitcode(BD.getProgram(), "reduced-simplified"); in DebugACrash()
621 static bool TestForOptimizerCrash(const BugDriver &BD, Module *M) { in TestForOptimizerCrash() argument
622 return BD.runPasses(M); in TestForOptimizerCrash()
649 static bool TestForCodeGenCrash(const BugDriver &BD, Module *M) { in TestForCodeGenCrash() argument
651 BD.compileProgram(M, &Error); in TestForCodeGenCrash()