[llvm] afc1a70 - [AliasSetTracker] More precise AAInfo intersection check

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 09:38:10 PDT 2020


Author: Nikita Popov
Date: 2020-07-09T18:29:41+02:00
New Revision: afc1a709433e3754ee3819efd9e144b657919131

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

LOG: [AliasSetTracker] More precise AAInfo intersection check

The code currently checks whether the intersection has one of TBAA,
Scope or NoAlias unset -- however, those might have already been
unset in the first place, in which case we will unnecessarily
report a change. Instead, compare the intersection result to the
original AAInfo.

This makes for a 0.5% geomean compile-time saving on CTMark.

Differential Revision: https://reviews.llvm.org/D83430

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/AliasSetTracker.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/AliasSetTracker.h b/llvm/include/llvm/Analysis/AliasSetTracker.h
index e94a758b06ba..690a94d9cf2c 100644
--- a/llvm/include/llvm/Analysis/AliasSetTracker.h
+++ b/llvm/include/llvm/Analysis/AliasSetTracker.h
@@ -87,12 +87,7 @@ class AliasSet : public ilist_node<AliasSet> {
         AAInfo = NewAAInfo;
       else {
         AAMDNodes Intersection(AAInfo.intersect(NewAAInfo));
-        if (!Intersection.TBAA || !Intersection.Scope ||
-            !Intersection.NoAlias) {
-          // NewAAInfo conflicts with AAInfo.
-          AAInfo = DenseMapInfo<AAMDNodes>::getTombstoneKey();
-          SizeChanged = true;
-        }
+        SizeChanged |= Intersection != AAInfo;
         AAInfo = Intersection;
       }
       return SizeChanged;


        


More information about the llvm-commits mailing list