[llvm] 875ecca - llvm-reduce: Remove unused class

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 07:13:40 PST 2023


Author: Matt Arsenault
Date: 2023-01-03T10:13:17-05:00
New Revision: 875ecca7621b89ad53262a17b5692ae4e7a5fefb

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

LOG: llvm-reduce: Remove unused class

Added: 
    

Modified: 
    llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp b/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
index 35d8b840ab726..2ff274f5f155d 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
@@ -104,38 +104,6 @@ class AttributeRemapper : public InstVisitor<AttributeRemapper> {
   }
 };
 
-struct AttributeCounter : public InstVisitor<AttributeCounter> {
-  /// How many features (in this case, attributes) did we count, total?
-  int AttributeCount = 0;
-
-  void visitModule(Module &M) {
-    for (GlobalVariable &GV : M.getGlobalList())
-      visitGlobalVariable(GV);
-  }
-
-  void visitGlobalVariable(GlobalVariable &GV) {
-    // Global variables only have one attribute set.
-    visitAttributeSet(GV.getAttributes());
-  }
-
-  void visitFunction(Function &F) {
-    if (F.getIntrinsicID() != Intrinsic::not_intrinsic)
-      return; // We can neither add nor remove attributes from intrinsics.
-    visitAttributeList(F.getAttributes());
-  }
-
-  void visitCallBase(CallBase &I) { visitAttributeList(I.getAttributes()); }
-
-  void visitAttributeList(const AttributeList &AL) {
-    for (const AttributeSet &AS : AL)
-      visitAttributeSet(AS);
-  }
-
-  void visitAttributeSet(const AttributeSet &AS) {
-    AttributeCount += AS.getNumAttributes();
-  }
-};
-
 } // namespace
 
 AttributeSet


        


More information about the llvm-commits mailing list