[llvm] c8c93fd - [Attributor] Avoid work for GEPs and wait till the users are visited

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 3 22:36:31 PST 2021


Author: Johannes Doerfert
Date: 2021-03-04T00:35:52-06:00
New Revision: c8c93fdf0a06ef37705a0908e20e9c2c7103fce4

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

LOG: [Attributor] Avoid work for GEPs and wait till the users are visited

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/AttributorAttributes.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index 54b5b5887d35..5a6d93a80c9d 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -3690,10 +3690,9 @@ static unsigned getKnownAlignForUse(Attributor &A, AAAlign &QueryingAA,
     return 0;
   }
   if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
-    if (GEP->hasAllConstantIndices()) {
+    if (GEP->hasAllConstantIndices())
       TrackUse = true;
-      return 0;
-    }
+    return 0;
   }
 
   MaybeAlign MA;


        


More information about the llvm-commits mailing list