[llvm] [DAGCombiner] cache negative result from getMergeStoreCandidates() (PR #106949)
Princeton Ferro via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 05:12:12 PDT 2024
================
@@ -191,6 +191,11 @@ namespace {
// AA - Used for DAG load/store alias analysis.
AliasAnalysis *AA;
+ /// This caches all chains that have already been processed in
+ /// DAGCombiner::getStoreMergeCandidates() and found to have no mergeable
+ /// stores candidates.
+ SmallSet<SDNode *, 32> ChainsWithoutMergeableStores;
----------------
Prince781 wrote:
> I didn't know it had the specialization, last I looked it didn't.
https://github.com/llvm/llvm-project/blob/af1e59aea2ea7d07ece1f34621dda38c995826a3/llvm/include/llvm/ADT/SmallSet.h#L253-L256
But I see this isn't used too frequently in the compiler, so I'll switch to `SmallPtrSet`.
https://github.com/llvm/llvm-project/pull/106949
More information about the llvm-commits
mailing list