[Mlir-commits] [flang] [mlir] [mlir][OpenMP] Model memory effects of omp.section and omp.sections (PR #230167)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Oct 19 03:16:07 PDT 2026
================
@@ -3536,6 +3536,29 @@ findEnclosingParallelOp(fir::FirOpBuilder &builder) {
return {};
}
+static bool isNonDerived(const semantics::Symbol &sym) {
+ const auto *type = sym.GetUltimate().GetType();
+ return type && type->AsIntrinsic();
+}
+
+static bool isNonDerivedItem(const semantics::Symbol *sym) {
+ const auto &ultimate = sym->GetUltimate();
+ // May be a common block
+ if (const auto *common =
+ ultimate.detailsIf<semantics::CommonBlockDetails>()) {
+ return llvm::all_of(common->objects(), [](const auto &member) {
+ return isNonDerived(*member);
+ });
+ }
+ return isNonDerived(ultimate);
+}
+
+static bool isDerivedVariable(mlir::Value variable) {
+ mlir::Type type = variable.getType();
+ return !fir::isa_derived(fir::getFortranElementType(type)) &&
+ !fir::isa_volatile_type(type);
----------------
JRP-arm wrote:
My thinking was that we should be more conservative with volatile types but that's not really the case.
https://github.com/llvm/llvm-project/pull/230167
More information about the Mlir-commits
mailing list