Add C API for thread yielding callback.
[oota-llvm.git] / lib / Analysis / LoopPass.cpp
index 683d6d74ab42949b14ef5bc7c45cf11b408c855a..8df18e75c64e243f619e3a92b0a8cb5c01f6f985 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "llvm/Analysis/LoopPass.h"
 #include "llvm/IR/IRPrintingPasses.h"
+#include "llvm/IR/LLVMContext.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/Timer.h"
 using namespace llvm;
@@ -253,6 +254,8 @@ bool LPPassManager::runOnFunction(Function &F) {
 
         // Then call the regular verifyAnalysis functions.
         verifyPreservedAnalysis(P);
+
+        F.getContext().yield();
       }
 
       removeNotPreservedAnalysis(P);