[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 17 12:42:10 PST 2024
================
@@ -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))
----------------
joaosaffran wrote:
I've removed the additional passes, now pass wrapper is running only structurizer pass. Though those were required as they were dependent passes, sorry for the confusion.
https://github.com/llvm/llvm-project/pull/116331
More information about the llvm-commits
mailing list