std::vector<Function*> &MiscompiledFunctions) {
bool MadeChange = false;
while (1) {
+ if (BugpointIsInterrupted) return MadeChange;
+
Module *ToNotOptimize = CloneModule(BD.getProgram());
Module *ToOptimize = SplitFunctionsOutOfModule(ToNotOptimize,
MiscompiledFunctions);
// See if we can rip any loops out of the miscompiled functions and still
// trigger the problem.
- if (ExtractLoops(BD, TestFn, MiscompiledFunctions)) {
+ if (!BugpointIsInterrupted &&
+ ExtractLoops(BD, TestFn, MiscompiledFunctions)) {
// Okay, we extracted some loops and the problem still appears. See if we
// can eliminate some of the created functions from being candidates.
std::cout << '\n';
}
- if (ExtractBlocks(BD, TestFn, MiscompiledFunctions)) {
+ if (!BugpointIsInterrupted &&
+ ExtractBlocks(BD, TestFn, MiscompiledFunctions)) {
// Okay, we extracted some blocks and the problem still appears. See if we
// can eliminate some of the created functions from being candidates.