[llvm] cccbd2a - Revert "[Attributor][NFCI] Move MemIntrinsic handling into the initializer"

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 13:29:41 PDT 2022


Author: Joseph Huber
Date: 2022-11-02T15:28:50-05:00
New Revision: cccbd2a2b2c38f47e2168998ad859d2b1f4347b4

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

LOG: Revert "[Attributor][NFCI] Move MemIntrinsic handling into the initializer"

This was causing failures when optimizing codes with complex numbers.
Revert until a fix can be implemented.

This reverts commit 7fdf3564c04075d3e6be2d9540e5a6f1e084be9f.

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 0b446a4f7407..cbc1f8b77c02 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -1516,15 +1516,13 @@ struct AAPointerInfoCallSiteArgument final : AAPointerInfoFloating {
   AAPointerInfoCallSiteArgument(const IRPosition &IRP, Attributor &A)
       : AAPointerInfoFloating(IRP, A) {}
 
-  /// See AbstractAttribute::initialize(...).
-  void initialize(Attributor &A) override {
-    AAPointerInfoFloating::initialize(A);
-
+  /// See AbstractAttribute::updateImpl(...).
+  ChangeStatus updateImpl(Attributor &A) override {
+    using namespace AA::PointerInfo;
     // We handle memory intrinsics explicitly, at least the first (=
     // destination) and second (=source) arguments as we know how they are
     // accessed.
     if (auto *MI = dyn_cast_or_null<MemIntrinsic>(getCtxI())) {
-      // TODO: Simplify the length.
       ConstantInt *Length = dyn_cast<ConstantInt>(MI->getLength());
       int64_t LengthVal = AA::OffsetAndSize::Unknown;
       if (Length)
@@ -1541,22 +1539,16 @@ struct AAPointerInfoCallSiteArgument final : AAPointerInfoFloating {
       } else {
         LLVM_DEBUG(dbgs() << "[AAPointerInfo] Unhandled memory intrinsic "
                           << *MI << "\n");
-        indicatePessimisticFixpoint();
+        return indicatePessimisticFixpoint();
       }
 
-      indicateOptimisticFixpoint();
-
       LLVM_DEBUG({
-        dbgs() << "Accesses by bin after initialization:\n";
+        dbgs() << "Accesses by bin after update:\n";
         dumpState(dbgs());
       });
-      return;
-    }
-  }
 
-  /// See AbstractAttribute::updateImpl(...).
-  ChangeStatus updateImpl(Attributor &A) override {
-    using namespace AA::PointerInfo;
+      return Changed;
+    }
 
     // TODO: Once we have call site specific value information we can provide
     //       call site specific liveness information and then it makes


        


More information about the llvm-commits mailing list