nicebert wrote:

> Using text from the commit message, can you explain why you are "forcing the 
> exit barrier the copy reads through"? And can it be optimized for no-wait?

The barrier was there because I carried over the rule from clang's regular 
worksharing loop, which emits the end-of-loop barrier even with nowait when 
there is a lastprivate. The wording in the commit message was wrong, the copy 
doesn't depend on it: only the thread that executed the last iteration does the 
copy, and it reads its own private copy and its own last-iteration flag, so it 
doesn't wait on any other thread. The end of the parallel region already 
synchronizes all threads after the copy. So yes, with nowait the barrier can be 
dropped, which I did in a2a1471e8d21, and I updated the PR description 
accordingly.

https://github.com/llvm/llvm-project/pull/224045
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to