[PATCH] D82027: Remove "unused" member ModuleSlice from `struct OpenMPOpt`

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 10:45:51 PDT 2020


mehdi_amini created this revision.
mehdi_amini added reviewers: sstefan1, jdoerfert.
Herald added subscribers: llvm-commits, guansong, hiraditya, yaxunl.
Herald added a project: LLVM.
sstefan1 accepted this revision.
sstefan1 added a comment.
This revision is now accepted and ready to land.

This was my bad. Thanks for noticing!



================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:271
     LLVM_DEBUG(dbgs() << TAG << "Run on SCC with " << SCC.size()
-                      << " functions in a slice with " << ModuleSlice.size()
                       << " functions\n");
----------------
This can now be `OMPInfoCache.ModuleSlice.size()`


This is fixing warning from clang:

warning: private field 'ModuleSlice' is not used [-Wunused-private-field]

  SmallPtrSetImpl<Function *> &ModuleSlice;
                               ^


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82027

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


Index: llvm/lib/Transforms/IPO/OpenMPOpt.cpp
===================================================================
--- llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -259,8 +259,7 @@
   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,7 +267,6 @@
     bool Changed = false;
 
     LLVM_DEBUG(dbgs() << TAG << "Run on SCC with " << SCC.size()
-                      << " functions in a slice with " << ModuleSlice.size()
                       << " functions\n");
 
     Changed |= deduplicateRuntimeCalls();
@@ -611,9 +609,6 @@
   /// 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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82027.271407.patch
Type: text/x-patch
Size: 1361 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200617/0efa7639/attachment.bin>


More information about the llvm-commits mailing list