Revert r103493, materializing functions in the regular PassManager.
authorDan Gohman <gohman@apple.com>
Tue, 11 May 2010 20:30:00 +0000 (20:30 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 11 May 2010 20:30:00 +0000 (20:30 +0000)
It works in simple cases, but it isn't a general solution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103499 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/PassManager.cpp

index 6883e9f9b1249cf43a634b2a2ba9817b78a4ae86..a56938c1592e9fc24b4d29a89a5a34e4415da4ef 100644 (file)
@@ -1444,16 +1444,8 @@ bool FPPassManager::runOnFunction(Function &F) {
 bool FPPassManager::runOnModule(Module &M) {
   bool Changed = doInitialization(M);
 
-  for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
-    Function &F = *I;
-    if (F.isMaterializable()) {
-      std::string errstr;
-      if (F.Materialize(&errstr))
-        report_fatal_error("Error reading bitcode file: " + Twine(errstr));
-    }
-
+  for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
     runOnFunction(*I);
-  }
 
   return doFinalization(M) || Changed;
 }