[flang-commits] [flang] [mlir] [flang][OpenMP] Add `hostIsSource` paramemter to `copyHostAssociateVar` (PR #123162)

Kareem Ergawy via flang-commits flang-commits at lists.llvm.org
Thu Jan 16 05:36:01 PST 2025


================
@@ -927,10 +927,8 @@ class FirConverter : public Fortran::lower::AbstractConverter {
 
     copyVar(sym, *lhs_sb, *rhs_sb, sym.flags());
 
-    if (copyAssignIP && copyAssignIP->isSet() &&
-        sym.test(Fortran::semantics::Symbol::Flag::OmpLastPrivate)) {
+    if (!hostIsSource)
       builder->restoreInsertionPoint(insPt);
----------------
ergawy wrote:

I just wanted to maintain what was meant in the original version of the code (i.e. reset only in case of lastprivate). But you are definitely right.

Actually, we can just restore the IP unconditionally it seems. All lit tests seem fine locally, let's see if CI has other opinions.

https://github.com/llvm/llvm-project/pull/123162


More information about the flang-commits mailing list