Revert "[Attributor][FIX] Avoid memory leakage through InstExclusionSet"
authorMitch Phillips <31459023+hctim@users.noreply.github.com>
Sat, 17 Dec 2022 01:56:21 +0000 (17:56 -0800)
committerMitch Phillips <31459023+hctim@users.noreply.github.com>
Sat, 17 Dec 2022 01:56:21 +0000 (17:56 -0800)
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.

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

index f7c4300..3d622fd 100644 (file)
@@ -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 @@ private:
   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;