[llvm] 86cdff0 - [OpenMPOpt] Use SetVector to store list of kernels.

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 13:55:49 PST 2022


Author: Eli Friedman
Date: 2022-01-19T13:55:32-08:00
New Revision: 86cdff0e21237fb0e880b2f52aa30e0d8f1084fa

URL: https://github.com/llvm/llvm-project/commit/86cdff0e21237fb0e880b2f52aa30e0d8f1084fa
DIFF: https://github.com/llvm/llvm-project/commit/86cdff0e21237fb0e880b2f52aa30e0d8f1084fa.diff

LOG: [OpenMPOpt] Use SetVector to store list of kernels.

Fixes test failures on reverse-iteration buildbot.

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/IPO/OpenMPOpt.h
    llvm/lib/Transforms/IPO/OpenMPOpt.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/IPO/OpenMPOpt.h b/llvm/include/llvm/Transforms/IPO/OpenMPOpt.h
index c6ac5bd46f57a..bf08336663b6b 100644
--- a/llvm/include/llvm/Transforms/IPO/OpenMPOpt.h
+++ b/llvm/include/llvm/Transforms/IPO/OpenMPOpt.h
@@ -21,7 +21,7 @@ namespace omp {
 using Kernel = Function *;
 
 /// Set of kernels in the module
-using KernelSet = SmallPtrSet<Kernel, 4>;
+using KernelSet = SetVector<Kernel>;
 
 /// Helper to determine if \p M contains OpenMP.
 bool containsOpenMP(Module &M);

diff  --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
index 2b29a0c93faa2..444d638d6b6d0 100644
--- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -163,7 +163,7 @@ struct AAICVTracker;
 struct OMPInformationCache : public InformationCache {
   OMPInformationCache(Module &M, AnalysisGetter &AG,
                       BumpPtrAllocator &Allocator, SetVector<Function *> &CGSCC,
-                      SmallPtrSetImpl<Kernel> &Kernels)
+                      KernelSet &Kernels)
       : InformationCache(M, AG, Allocator, &CGSCC), OMPBuilder(M),
         Kernels(Kernels) {
 
@@ -478,7 +478,7 @@ struct OMPInformationCache : public InformationCache {
   }
 
   /// Collection of known kernels (\see Kernel) in the module.
-  SmallPtrSetImpl<Kernel> &Kernels;
+  KernelSet &Kernels;
 
   /// Collection of known OpenMP runtime functions..
   DenseSet<const Function *> RTLFunctions;


        


More information about the llvm-commits mailing list