xlauko wrote: Hey @bcardosolopes I think we can make this more MLIR idiomatic, it already has some infrastructure for similar analysis, so we don't need to reinvent the wheel here. The hand-written recursive walk and `foldToConstant` overlap with what `mlir::dataflow` already provides: `DeadCodeAnalysis` for block and region liveness through `RegionBranchOpInterface`, and `SparseConstantPropagation` for constant conditions. I will give this a look and prototype the analysis as a dense forward analysis on `DataFlowSolver` that reuses both and adds a small lattice for the CIR-specific edges. Will keep you updated :)
https://github.com/llvm/llvm-project/pull/239774 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
