[PATCH] D145216: [llvm][Uniformity] correctly use a vector as a set by uniqifying elements

Sameer Sahasrabuddhe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 02:27:26 PST 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG093b5ac85f06: [llvm][Uniformity] correctly use a vector as a set by uniqifying elements (authored by sameerds).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145216/new/

https://reviews.llvm.org/D145216

Files:
  llvm/include/llvm/ADT/GenericUniformityImpl.h


Index: llvm/include/llvm/ADT/GenericUniformityImpl.h
===================================================================
--- llvm/include/llvm/ADT/GenericUniformityImpl.h
+++ llvm/include/llvm/ADT/GenericUniformityImpl.h
@@ -876,6 +876,11 @@
     }
     if (!Promoted)
       break;
+
+    // Restore the set property for the temporary vector
+    llvm::sort(Temp);
+    Temp.erase(std::unique(Temp.begin(), Temp.end()), Temp.end());
+
     DomFrontier = Temp;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145216.502081.patch
Type: text/x-patch
Size: 468 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230303/daeb0f63/attachment.bin>


More information about the llvm-commits mailing list