[all-commits] [llvm/llvm-project] ae5a70: [MLIR][OpenMP] Mark openmp.parallel and omp.wsloop...

William Moses via All-commits all-commits at lists.llvm.org
Thu Mar 3 19:37:39 PST 2022


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

  Changed paths:
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td

  Log Message:
  -----------
  [MLIR][OpenMP] Mark openmp.parallel and omp.wsloop as having recursive side effects

An OpenMP wsloop is simply a regular for loop with the bounds determined by the thread number, and the same justification to allow this for scf.for works for omp.wsloop.

An OpenMP parallel is a parallel for, per thread. Similarly the same justification for scf.parallel having recursive side effects applies here.

In both cases the general justification is that the ops themselves don't have side effects (besides inaccessible runtime-specific memory) and thus the side effects are simply that of the contained ops.

Reviewed By: bondhugula

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




More information about the All-commits mailing list