================
@@ -94,3 +91,18 @@ bool WebAssemblyMCLowerPrePass::runOnModule(Module &M) {
}
return true;
}
+
+bool WebAssemblyMCLowerPreLegacy::runOnModule(Module &M) {
+ auto *MMIWP = getAnalysisIfAvailable<MachineModuleInfoWrapperPass>();
+ if (!MMIWP)
+ return true;
+ MachineModuleInfo &MMI = MMIWP->getMMI();
+ return mcLower(M, MMI);
+}
+
+PreservedAnalyses WebAssemblyMCLowerPrePass::run(Module &M,
+ ModuleAnalysisManager &MAM) {
+ MachineModuleInfo &MMI = MAM.getResult<MachineModuleAnalysis>(M).getMMI();
+ return mcLower(M, MMI) ? PreservedAnalyses::none().preserveSet<CFGAnalyses>()
+ : PreservedAnalyses::all();
----------------
aheejin wrote:
I know you followed the current code but actually this pass doesn't seem to
modify code..? We should preserve everything. Can you fix this and the existing
code here too?
https://github.com/llvm/llvm-project/blob/d89537dd93f6fba07864e3583e11996c91a794b8/llvm/lib/Target/WebAssembly/WebAssemblyMCLowerPrePass.cpp#L36
https://github.com/llvm/llvm-project/pull/210440
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits