[all-commits] [llvm/llvm-project] 03794a: [mlir][OpenMP] Separate OutlinableInterface from t...

Tom Eccles via All-commits all-commits at lists.llvm.org
Mon Mar 23 09:36:54 PDT 2026


  Branch: refs/heads/users/tblah/taskloop-allocas-1
  Home:   https://github.com/llvm/llvm-project
  Commit: 03794a2b0c37b0cf02652399fb328a2140b81d44
      https://github.com/llvm/llvm-project/commit/03794a2b0c37b0cf02652399fb328a2140b81d44
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2026-03-23 (Mon, 23 Mar 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    A flang/test/Integration/OpenMP/taskloop-alloca-placement.f90
    M flang/test/Lower/OpenMP/if-clause.f90
    M flang/test/Lower/OpenMP/implicit-dsa.f90
    M flang/test/Lower/OpenMP/masked_taskloop.f90
    M flang/test/Lower/OpenMP/parallel-masked-taskloop.f90
    M flang/test/Lower/OpenMP/taskloop-cancel.f90
    M flang/test/Lower/OpenMP/taskloop-collapse.f90
    M flang/test/Lower/OpenMP/taskloop-grainsize.f90
    A flang/test/Lower/OpenMP/taskloop-inreduction.f90
    M flang/test/Lower/OpenMP/taskloop-numtasks.f90
    A flang/test/Lower/OpenMP/taskloop-reduction.f90
    M flang/test/Lower/OpenMP/taskloop.f90
    R flang/test/Lower/taskloop-inreduction.f90
    R flang/test/Lower/taskloop-reduction.f90
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
    M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    M mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir
    M mlir/test/Dialect/OpenMP/invalid.mlir
    M mlir/test/Dialect/OpenMP/ops.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop-cancel.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop-cancellation-point.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop-collapse.mlir
    A mlir/test/Target/LLVMIR/openmp-taskloop-context-alloca.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop-final.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop-grainsize.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop-if.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop-mergeable.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop-no-context-struct.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop-nogroup.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop-num_tasks.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop-priority.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop-untied.mlir
    M mlir/test/Target/LLVMIR/openmp-taskloop.mlir
    M mlir/test/Target/LLVMIR/openmp-todo.mlir

  Log Message:
  -----------
  [mlir][OpenMP] Separate OutlinableInterface from taskloop LoopWrapper

Separate taskloop context and loop lowering into different operations.
This allows us to have separate operations representing the outlinable
interface and the loop wrapper interface so that there is somewhere
better than the loop body to put task-local allocations:

```
omp.taskloop.context {
  llvm.alloca ...
  omp.taskloop {
    omp.loop_nest ... {
      ...
    }
  }
  omp.terminator
}
```

The tests for the real functional change are
  - flang/test/Integration/OpenMP/taskloop-alloca-placement.f90
  - mlir/test/Target/LLVMIR/openmp-taskloop-context-alloca.mlir

RFC: https://discourse.llvm.org/t/rfc-openmp-alloca-placement-for-openmp-loop-wrappers/89512/7

This commit keeps all of the clauses on the omp.taskloop op to minimise
changes that have to go into this one commit. I will follow this by
moving clauses to the operation in which they generate code.

Patch 1/3



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