[clang] [CIR] -Wreturn-type (1/2): Add an analysis classifying how control reaches a function's end (PR #239774)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 9 12:11:01 PST 2026
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
More information about the cfe-commits
mailing list