================ @@ -0,0 +1,18 @@ +//===-- Passes.td - HLFIR pass definition file -------------*- tablegen -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef FORTRAN_DIALECT_OPENMP_PASSES +#define FORTRAN_DIALECT_OPENMP_PASSES + +include "mlir/Pass/PassBase.td" + +def LowerWorkshare : Pass<"lower-workshare"> { ---------------- tblah wrote:
This pass doesn't have an operation type associated with it and so `pm.addPass` will run it on every operation in the module (and the module itself). I think we can only get workshare operations inside of functions so maybe this should be run on func.func. Maybe for more future proofing you could run it on all top level operations (e.g. `addNestedPassToAllTopLevelOperations` instead of `pm.addPass`). I think the pass has to be run on the parent of the workshare loop not on the workshare loop operation itself because operations are inserted and removed from that parent. https://github.com/llvm/llvm-project/pull/101446 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits