[all-commits] [llvm/llvm-project] 4be402: [flang] disable cf canonicalization patterns at O0...

jeanPerier via All-commits all-commits at lists.llvm.org
Thu Oct 1 03:02:04 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4be402e459e2fa1e98826c99e3fcef4121729e26
      https://github.com/llvm/llvm-project/commit/4be402e459e2fa1e98826c99e3fcef4121729e26
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2026-10-01 (Thu, 01 Oct 2026)

  Changed paths:
    M flang/include/flang/Optimizer/Transforms/Passes.h
    M flang/include/flang/Optimizer/Transforms/Passes.td
    M flang/lib/Optimizer/Passes/Pipelines.cpp
    M flang/lib/Optimizer/Transforms/CMakeLists.txt
    A flang/lib/Optimizer/Transforms/O0CanonicalizerPass.cpp
    M flang/test/Driver/mlir-debug-pass-pipeline.f90
    M flang/test/Driver/mlir-pass-pipeline.f90
    M flang/test/Integration/OpenMP/parallel-private-reduction-worstcase.f90
    A flang/test/Integration/array-assignment-entry-debug.f90
    A flang/test/Integration/array-assignment-entry-paths.f90
    M flang/test/Integration/cold_array_repacking.f90
    A flang/test/Transforms/o0-canonicalize.mlir

  Log Message:
  -----------
  [flang] disable cf canonicalization patterns at O0 to preserve line location (#227770)

This patch is a follow up to #202065 and intends to preserve at least one loop
header instructions for each expanded array expressions at O0 so that breakpoint
set on array expression statements that are expanded inline fire once (an not at
each iteration which happens when the only instruction with the statement line
location is in the loop body). CF canonicalization patterns may remove branch
instructions that are the only valid breakpoint position for an array expression
statement from the source.

To solve this, this patch adds a new canonicalization pass that allows skipping
ControlFlow dialect pattern registration at O0.

This replaces #227306 approach that was using a debug pattern filtering
approach instead of using a new pass.

Assisted-by: AI



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