[flang] [llvm] [flang][OpenMP] Try to unify induction var privatization for OMP regions. (PR #91116)

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 04:04:17 PDT 2024


================
@@ -123,4 +123,9 @@ ConstructQueue buildConstructQueue(
 
   return constructs;
 }
+
+bool isLastItemInQueue(ConstructQueue::iterator item,
+                       const ConstructQueue &queue) {
+  return std::prev(queue.end()) == item;
----------------
kparzysz wrote:

Comparing `std::next(item) == queue.end()` is more canonical.  Operations on the `end()` iterator may not work for all containers, but the "next" comparison will.

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


More information about the llvm-commits mailing list