================ @@ -1229,8 +1248,15 @@ FunctionPass *llvm::createSPIRVStructurizerPass() { PreservedAnalyses SPIRVStructurizerWrapper::run(Function &F, FunctionAnalysisManager &AF) { - FunctionPass *StructurizerPass = createSPIRVStructurizerPass(); - if (!StructurizerPass->runOnFunction(F)) + // TODO: Review this after migrating SPIRV passes to "modern" pass manager. + auto FPM = legacy::FunctionPassManager(F.getParent()); + FPM.add(createLoopSimplifyPass()); + FPM.add(new DominatorTreeWrapperPass()); + FPM.add(new LoopInfoWrapperPass()); + FPM.add(new SPIRVConvergenceRegionAnalysisWrapperPass()); + FPM.add(createSPIRVStructurizerPass()); + + if (!FPM.run(F)) ---------------- llvm-beanz wrote:
This is real hacky... It seems way wrong to have the pass wrapper running a whole bunch of additional passes especially passes that mutate the IR. That defeats the point of being able to run a pass in isolation to test it. https://github.com/llvm/llvm-project/pull/116331 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits