[all-commits] [llvm/llvm-project] b8ba3c: [mlir][SCFToAffine] Raise scf.for to affine.for (#...

Reinhard Stahn via All-commits all-commits at lists.llvm.org
Wed Jul 15 11:05:48 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b8ba3c2b72cb53268129bbecfeb4ba7ec5b8d831
      https://github.com/llvm/llvm-project/commit/b8ba3c2b72cb53268129bbecfeb4ba7ec5b8d831
  Author: Reinhard Stahn <rainij36 at proton.me>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    M mlir/include/mlir/Conversion/Passes.h
    M mlir/include/mlir/Conversion/Passes.td
    A mlir/include/mlir/Conversion/SCFToAffine/SCFToAffine.h
    M mlir/lib/Conversion/CMakeLists.txt
    A mlir/lib/Conversion/SCFToAffine/CMakeLists.txt
    A mlir/lib/Conversion/SCFToAffine/SCFToAffine.cpp
    A mlir/test/Conversion/SCFToAffine/scf-to-affine.mlir

  Log Message:
  -----------
  [mlir][SCFToAffine] Raise scf.for to affine.for (#200851)

Add a pass `-raise-scf-to-affine` that rewrites `scf.for` into
`affine.for` when the bounds and step are valid affine quantities. It
handles constant and dynamic steps, and integer-typed loops (by a
lossless cast of the bounds to `index`).

This is a first step; raising further scf ops to affine will follow.

Assisted-by: Claude Code (Anthropic)
Co-authored-by: Ming Yan <nexming7 at gmail.com>
Co-authored-by: Julian Farnsteiner <jcf96 at proton.me>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list