[llvm] a8dad30 - Revert "Remove unused class variable ModuleSlice." as it was

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 14:45:40 PDT 2020


Author: Eric Christopher
Date: 2020-06-17T14:45:17-07:00
New Revision: a8dad3038816cdc664c1265c65429f7aac109362

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

LOG: Revert "Remove unused class variable ModuleSlice." as it was
used in debug only code.

This reverts commit 07a1749081bac07515d357fd96165662031de527.

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 bd44170682be..9a0e0851822c 100644
--- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -259,7 +259,8 @@ struct OpenMPOpt {
   OpenMPOpt(SmallVectorImpl<Function *> &SCC, CallGraphUpdater &CGUpdater,
             OptimizationRemarkGetter OREGetter,
             OMPInformationCache &OMPInfoCache)
-      : M(*(*SCC.begin())->getParent()), SCC(SCC), CGUpdater(CGUpdater),
+      : M(*(*SCC.begin())->getParent()), SCC(SCC),
+        ModuleSlice(OMPInfoCache.ModuleSlice), CGUpdater(CGUpdater),
         OREGetter(OREGetter), OMPInfoCache(OMPInfoCache) {}
 
   /// Run all OpenMP optimizations on the underlying SCC/ModuleSlice.
@@ -610,6 +611,9 @@ 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