================
@@ -568,31 +572,44 @@ bool writeThinLTOBitcode(raw_ostream &OS, raw_ostream 
*ThinLinkOS,
   // produced for the full link.
   ModuleHash ModHash = {{0}};
   WriteBitcodeToFile(M, OS, ShouldPreserveUseListOrder, Index,
-                     /*GenerateHash=*/true, &ModHash);
+                     /*GenerateHash=*/true, &ModHash, TM);
   // If a minimized bitcode module was requested for the thin link, only
   // the information that is needed by thin link will be written in the
   // given OS.
   if (ThinLinkOS && Index)
-    writeThinLinkBitcodeToFile(M, *ThinLinkOS, *Index, ModHash);
+    writeThinLinkBitcodeToFile(M, *ThinLinkOS, *Index, ModHash, TM);
   return false;
 }
 
 } // anonymous namespace
 
 PreservedAnalyses
 llvm::ThinLTOBitcodeWriterPass::run(Module &M, ModuleAnalysisManager &AM) {
-  FunctionAnalysisManager &FAM =
-      AM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
-
   M.removeDebugIntrinsicDeclarations();
 
+  FunctionAnalysisManager &FAM =
----------------
teresajohnson wrote:

Rather than doing all this restructuring of the current callers of 
ModuleSummaryIndexAnalysis, can you just change that analysis pass to take the 
TM? E.g. see CustomizedAnalysis in llvm-project/llvm/unittests/IR
/PassManagerTest.cpp, and its invocation 
[here](https://github.com/llvm/llvm-project/blob/1bd4f9719faac77f368a7bdfdb47ead56a808375/llvm/unittests/IR/PassManagerTest.cpp#L578)

https://github.com/llvm/llvm-project/pull/143692
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to