[all-commits] [llvm/llvm-project] 78fb4f: [SCF][MemRef] Enable SCF.Parallel Lowering to use ...

William Moses via All-commits all-commits at lists.llvm.org
Tue Mar 1 10:25:23 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 78fb4f9d5dd95d26424919f2da184e1119ccb023
      https://github.com/llvm/llvm-project/commit/78fb4f9d5dd95d26424919f2da184e1119ccb023
  Author: William S. Moses <gh at wsmoses.com>
  Date:   2022-03-01 (Tue, 01 Mar 2022)

  Changed paths:
    M mlir/include/mlir/Conversion/Passes.td
    M mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
    M mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
    M mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
    M mlir/test/Conversion/SCFToOpenMP/reductions.mlir
    M mlir/test/Conversion/SCFToOpenMP/scf-to-openmp.mlir
    M mlir/test/Dialect/MemRef/canonicalize.mlir

  Log Message:
  -----------
  [SCF][MemRef] Enable SCF.Parallel Lowering to use Scope Op

As discussed in https://reviews.llvm.org/D119743 scf.parallel would continuously stack allocate since the alloca op was placd in the wsloop rather than the omp.parallel. This PR is the second stage of the fix for that problem. Specifically, we now introduce an alloca scope around the inlined body of the scf.parallel and enable a canonicalization to hoist the allocations to the surrounding allocation scope (e.g. omp.parallel).

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D120423




More information about the All-commits mailing list