[llvm] 0cc9c02 - [Attributor][NFC] Minor code cleanups to minimize follow up diffs

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 21:17:18 PDT 2020


Author: Johannes Doerfert
Date: 2020-05-05T23:14:23-05:00
New Revision: 0cc9c022550e5dd8b0efd4526274ab082b86dc5c

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

LOG: [Attributor][NFC] Minor code cleanups to minimize follow up diffs

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 c90dcaad3fd1..a727f31f6d77 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -5617,7 +5617,6 @@ struct AAMemoryBehaviorCallSiteArgument final : AAMemoryBehaviorArgument {
         removeKnownBits(NO_READS);
         removeAssumedBits(NO_READS);
       }
-    } else {
     }
     AAMemoryBehaviorArgument::initialize(A);
   }
@@ -5701,8 +5700,10 @@ struct AAMemoryBehaviorCallSite final : AAMemoryBehaviorImpl {
   void initialize(Attributor &A) override {
     AAMemoryBehaviorImpl::initialize(A);
     Function *F = getAssociatedFunction();
-    if (!F || !A.isFunctionIPOAmendable(*F))
+    if (!F || !A.isFunctionIPOAmendable(*F)) {
       indicatePessimisticFixpoint();
+      return;
+    }
   }
 
   /// See AbstractAttribute::updateImpl(...).
@@ -6400,8 +6401,10 @@ struct AAMemoryLocationCallSite final : AAMemoryLocationImpl {
   void initialize(Attributor &A) override {
     AAMemoryLocationImpl::initialize(A);
     Function *F = getAssociatedFunction();
-    if (!F || !A.isFunctionIPOAmendable(*F))
+    if (!F || !A.isFunctionIPOAmendable(*F)) {
       indicatePessimisticFixpoint();
+      return;
+    }
   }
 
   /// See AbstractAttribute::updateImpl(...).


        


More information about the llvm-commits mailing list