[llvm] 77b79d7 - Remove "unused" member ModuleSlice from `struct OpenMPOpt`

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 20:02:37 PDT 2020


Author: Mehdi Amini
Date: 2020-06-18T03:02:26Z
New Revision: 77b79d79c05f2431b77be48d35437741eb39cdae

URL: https://github.com/llvm/llvm-project/commit/77b79d79c05f2431b77be48d35437741eb39cdae
DIFF: https://github.com/llvm/llvm-project/commit/77b79d79c05f2431b77be48d35437741eb39cdae.diff

LOG: Remove "unused" member ModuleSlice from `struct OpenMPOpt`

This is fixing warning from clang:

 warning: private field 'ModuleSlice' is not used [-Wunused-private-field]
  SmallPtrSetImpl<Function *> &ModuleSlice;
                               ^

Differential Revision: https://reviews.llvm.org/D82027

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
index 9a0e0851822c..4a5f919aa631 100644
--- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -259,8 +259,7 @@ struct OpenMPOpt {
   OpenMPOpt(SmallVectorImpl<Function *> &SCC, CallGraphUpdater &CGUpdater,
             OptimizationRemarkGetter OREGetter,
             OMPInformationCache &OMPInfoCache)
-      : M(*(*SCC.begin())->getParent()), SCC(SCC),
-        ModuleSlice(OMPInfoCache.ModuleSlice), CGUpdater(CGUpdater),
+      : M(*(*SCC.begin())->getParent()), SCC(SCC), CGUpdater(CGUpdater),
         OREGetter(OREGetter), OMPInfoCache(OMPInfoCache) {}
 
   /// Run all OpenMP optimizations on the underlying SCC/ModuleSlice.
@@ -268,8 +267,8 @@ struct OpenMPOpt {
     bool Changed = false;
 
     LLVM_DEBUG(dbgs() << TAG << "Run on SCC with " << SCC.size()
-                      << " functions in a slice with " << ModuleSlice.size()
-                      << " functions\n");
+                      << " functions in a slice with "
+                      << OMPInfoCache.ModuleSlice.size() << " functions\n");
 
     Changed |= deduplicateRuntimeCalls();
     Changed |= deleteParallelRegions();
@@ -611,9 +610,6 @@ struct OpenMPOpt {
   /// The SCC we are operating on.
   SmallVectorImpl<Function *> &SCC;
 
-  /// The slice of the module we are allowed to look at.
-  SmallPtrSetImpl<Function *> &ModuleSlice;
-
   /// Callback to update the call graph, the first argument is a removed call,
   /// the second an optional replacement call.
   CallGraphUpdater &CGUpdater;


        


More information about the llvm-commits mailing list