[llvm] 0c7d4d7 - [Attributor][NFCI] Remove obsolete code

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 22:26:28 PDT 2019


Author: Johannes Doerfert
Date: 2019-11-02T00:25:46-05:00
New Revision: 0c7d4d7f3e26bed39ee4e2817ca5078ab111c05c

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

LOG: [Attributor][NFCI] Remove obsolete code

The code in question does not add anything as the class is a subclass of
AACallSiteReturnedFromReturnedAndMustBeExecutedContext already.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 6589b16348f4..a0677c194f17 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -2890,30 +2890,6 @@ struct AADereferenceableCallSiteReturned final
       AADereferenceable, AADereferenceableImpl>;
   AADereferenceableCallSiteReturned(const IRPosition &IRP) : Base(IRP) {}
 
-  /// See AbstractAttribute::initialize(...).
-  void initialize(Attributor &A) override {
-    Base::initialize(A);
-    Function *F = getAssociatedFunction();
-    if (!F)
-      indicatePessimisticFixpoint();
-  }
-
-  /// See AbstractAttribute::updateImpl(...).
-  ChangeStatus updateImpl(Attributor &A) override {
-    // TODO: Once we have call site specific value information we can provide
-    //       call site specific liveness information and then it makes
-    //       sense to specialize attributes for call sites arguments instead of
-    //       redirecting requests to the callee argument.
-
-    ChangeStatus Change = Base::updateImpl(A);
-    Function *F = getAssociatedFunction();
-    const IRPosition &FnPos = IRPosition::returned(*F);
-    auto &FnAA = A.getAAFor<AADereferenceable>(*this, FnPos);
-    return Change |
-           clampStateAndIndicateChange(
-               getState(), static_cast<const DerefState &>(FnAA.getState()));
-  }
-
   /// See AbstractAttribute::trackStatistics()
   void trackStatistics() const override {
     STATS_DECLTRACK_CS_ATTR(dereferenceable);


        


More information about the llvm-commits mailing list