This revision was automatically updated to reflect the committed changes. Closed by commit rG313ee609e16b: [OpenMP] Fix non-determinism in clang task codegen (lastprivates) (authored by ggeorgakoudis).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101800/new/ https://reviews.llvm.org/D101800 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp Index: clang/lib/CodeGen/CGStmtOpenMP.cpp =================================================================== --- clang/lib/CodeGen/CGStmtOpenMP.cpp +++ clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -4293,7 +4293,7 @@ } } // Get list of lastprivate variables (for taskloops). - llvm::DenseMap<const VarDecl *, const DeclRefExpr *> LastprivateDstsOrigs; + llvm::MapVector<const VarDecl *, const DeclRefExpr *> LastprivateDstsOrigs; for (const auto *C : S.getClausesOfKind<OMPLastprivateClause>()) { auto IRef = C->varlist_begin(); auto ID = C->destination_exprs().begin(); @@ -4304,8 +4304,8 @@ Data.LastprivateCopies.push_back(IInit); } LastprivateDstsOrigs.insert( - {cast<VarDecl>(cast<DeclRefExpr>(*ID)->getDecl()), - cast<DeclRefExpr>(*IRef)}); + std::make_pair(cast<VarDecl>(cast<DeclRefExpr>(*ID)->getDecl()), + cast<DeclRefExpr>(*IRef))); ++IRef; ++ID; }
Index: clang/lib/CodeGen/CGStmtOpenMP.cpp =================================================================== --- clang/lib/CodeGen/CGStmtOpenMP.cpp +++ clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -4293,7 +4293,7 @@ } } // Get list of lastprivate variables (for taskloops). - llvm::DenseMap<const VarDecl *, const DeclRefExpr *> LastprivateDstsOrigs; + llvm::MapVector<const VarDecl *, const DeclRefExpr *> LastprivateDstsOrigs; for (const auto *C : S.getClausesOfKind<OMPLastprivateClause>()) { auto IRef = C->varlist_begin(); auto ID = C->destination_exprs().begin(); @@ -4304,8 +4304,8 @@ Data.LastprivateCopies.push_back(IInit); } LastprivateDstsOrigs.insert( - {cast<VarDecl>(cast<DeclRefExpr>(*ID)->getDecl()), - cast<DeclRefExpr>(*IRef)}); + std::make_pair(cast<VarDecl>(cast<DeclRefExpr>(*ID)->getDecl()), + cast<DeclRefExpr>(*IRef))); ++IRef; ++ID; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits