https://github.com/Xazax-hun created 
https://github.com/llvm/llvm-project/pull/244866

EquivalenceClass derived from FoldingSetNode but was never put in a FoldingSet; 
its Profile method is all ImmutableMap/Set need. Drop the base. This shrinks it 
from 16 to 8 bytes on 64-bit targets, and the ClassMap, ClassMembers, 
ConstraintRange and DisequalityMap nodes from 80 to 72 bytes and the ClassSet 
nodes from 72 to 64 bytes.

Assisted-by: Claude Opus 5.5

From 7a98c97143a0b1eec00b0592de757b881ac90032 Mon Sep 17 00:00:00 2001
From: Gabor Horvath <[email protected]>
Date: Sat, 21 Nov 2026 04:50:46 +0000
Subject: [PATCH] [analyzer] Drop the unused FoldingSetNode base of
 EquivalenceClass

EquivalenceClass derived from FoldingSetNode but was never put in a
FoldingSet; its Profile method is all ImmutableMap/Set need. Drop the
base. This shrinks it from 16 to 8 bytes on 64-bit targets, and the
ClassMap, ClassMembers, ConstraintRange and DisequalityMap nodes from
80 to 72 bytes and the ClassSet nodes from 72 to 64 bytes.

On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr) the
performance and the peak memory of the static analyzer are unchanged
within noise. The analyzer statistics and diagnostics are unchanged.

Assisted-by: Claude Opus 5.5
---
 clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp 
b/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
index d96135e4006ca4..abefc37a1565de 100644
--- a/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
+++ b/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
@@ -911,7 +911,7 @@ namespace {
 ///     to produce non-trivial classes.
 ///     If, at some point, we can assume that two symbols from two distinct
 ///     classes are equal, we can merge these classes.
-class EquivalenceClass : public llvm::FoldingSetNode {
+class EquivalenceClass {
 public:
   /// Find equivalence class for the given symbol in the given state.
   [[nodiscard]] static inline EquivalenceClass find(ProgramStateRef State,

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to