ggeorgakoudis created this revision. Herald added subscribers: mgrang, guansong, yaxunl. ggeorgakoudis requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D101952 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp Index: clang/lib/CodeGen/CGStmtOpenMP.cpp =================================================================== --- clang/lib/CodeGen/CGStmtOpenMP.cpp +++ clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -971,7 +971,7 @@ // operator=(threadprivate_var2, master_threadprivate_var2); // ... // __kmpc_barrier(&loc, global_tid); - llvm::DenseSet<const VarDecl *> CopiedVars; + llvm::SetVector<const VarDecl *> CopiedVars; llvm::BasicBlock *CopyBegin = nullptr, *CopyEnd = nullptr; for (const auto *C : D.getClausesOfKind<OMPCopyinClause>()) { auto IRef = C->varlist_begin(); @@ -980,7 +980,7 @@ for (const Expr *AssignOp : C->assignment_ops()) { const auto *VD = cast<VarDecl>(cast<DeclRefExpr>(*IRef)->getDecl()); QualType Type = VD->getType(); - if (CopiedVars.insert(VD->getCanonicalDecl()).second) { + if (CopiedVars.insert(VD->getCanonicalDecl())) { // Get the address of the master variable. If we are emitting code with // TLS support, the address is passed from the master as field in the // captured declaration.
Index: clang/lib/CodeGen/CGStmtOpenMP.cpp =================================================================== --- clang/lib/CodeGen/CGStmtOpenMP.cpp +++ clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -971,7 +971,7 @@ // operator=(threadprivate_var2, master_threadprivate_var2); // ... // __kmpc_barrier(&loc, global_tid); - llvm::DenseSet<const VarDecl *> CopiedVars; + llvm::SetVector<const VarDecl *> CopiedVars; llvm::BasicBlock *CopyBegin = nullptr, *CopyEnd = nullptr; for (const auto *C : D.getClausesOfKind<OMPCopyinClause>()) { auto IRef = C->varlist_begin(); @@ -980,7 +980,7 @@ for (const Expr *AssignOp : C->assignment_ops()) { const auto *VD = cast<VarDecl>(cast<DeclRefExpr>(*IRef)->getDecl()); QualType Type = VD->getType(); - if (CopiedVars.insert(VD->getCanonicalDecl()).second) { + if (CopiedVars.insert(VD->getCanonicalDecl())) { // Get the address of the master variable. If we are emitting code with // TLS support, the address is passed from the master as field in the // captured declaration.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits