[PATCH] D70258: [OpenMP][IR-Builder] Introduce the finalization stack
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 22:46:03 PST 2019
jdoerfert added inline comments.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:1499-1509
+ OMPBuilder->pushFinalizationCB(std::move(FI));
+ }
+
CGOpenMPOutlinedRegionInfo CGInfo(*CS, ThreadIDVar, CodeGen, InnermostKind,
HasCancel, OutlinedHelperName);
CodeGenFunction::CGCapturedStmtRAII CapInfoRAII(CGF, &CGInfo);
+ llvm::Function *Fn = CGF.GenerateOpenMPCapturedStmtFunction(*CS);
----------------
ABataev wrote:
> Again, need RAII
There is no appropriate scope to put it in.
================
Comment at: llvm/include/llvm/Frontend/OpenMPIRBuilder.h:69-71
+ void pushFinalizationCB(FinalizationInfo &&FI) {
+ FinalizationStack.emplace_back(std::move(FI));
+ }
----------------
ABataev wrote:
> Maybe `push...` for const reference and `emplace...` for variadic template (just like in standard library)?
That would defeat the purpose of using move semantic. I can make it a push but we will then have to copy and not move.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70258/new/
https://reviews.llvm.org/D70258
More information about the llvm-commits
mailing list