[llvm] c8468f1 - Revert "[Attributor][FIX] Avoid memory leakage through InstExclusionSet"

Mitch Phillips via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 17:57:33 PST 2022


Author: Mitch Phillips
Date: 2022-12-16T17:56:21-08:00
New Revision: c8468f16e2cfb70e01e4ceba3466b8a32857159c

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

LOG: Revert "[Attributor][FIX] Avoid memory leakage through InstExclusionSet"

This reverts commit 4a5d0d8704aa2860c0459a63adfdd415a451c4f1.

Reason: This change is dependent on a commit that needs to be rolled
back because it broke the ASan buildbot. See
https://reviews.llvm.org/rGfc21f2d7bae2e0be630470cc7ca9323ed5859892 for
more information.

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/IPO/Attributor.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index f7c430065fb4a..3d622fd434b9a 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -1142,10 +1142,6 @@ struct InformationCache {
     // the destructor manually.
     for (auto &It : FuncInfoMap)
       It.getSecond()->~FunctionInfo();
-    // Same is true for the instruction exclusions sets.
-    using AA::InstExclusionSetTy;
-    for (auto *BES : BESets)
-      BES->~InstExclusionSetTy();
   }
 
   /// Apply \p CB to all uses of \p F. If \p LookThroughConstantExprUses is
@@ -1342,7 +1338,7 @@ struct InformationCache {
   SetVector<const Instruction *> AssumeOnlyValues;
 
   /// Cache for block sets to allow reuse.
-  DenseSet<AA::InstExclusionSetTy *> BESets;
+  DenseSet<const AA::InstExclusionSetTy *> BESets;
 
   /// Getters for analysis.
   AnalysisGetter &AG;


        


More information about the llvm-commits mailing list