[llvm] r373987 - [Attributor][FIX] Remove initialize calls and add undefs

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 16:28:54 PDT 2019


Author: jdoerfert
Date: Mon Oct  7 16:28:54 2019
New Revision: 373987

URL: http://llvm.org/viewvc/llvm-project?rev=373987&view=rev
Log:
[Attributor][FIX] Remove initialize calls and add undefs

The initialization logic has become part of the Attributor but the
patches that introduced these calls here were in development when the
transition happened.

We also now clean up (undefine) the macros used to create attributes.

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

Modified: llvm/trunk/lib/Transforms/IPO/Attributor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Attributor.cpp?rev=373987&r1=373986&r2=373987&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Attributor.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Attributor.cpp Mon Oct  7 16:28:54 2019
@@ -4778,7 +4778,6 @@ const char AAMemoryBehavior::ID = 0;
       SWITCH_PK_INV(CLASS, IRP_CALL_SITE, "call site")                         \
       SWITCH_PK_CREATE(CLASS, IRP, IRP_FUNCTION, Function)                     \
     }                                                                          \
-    AA->initialize(A);                                                         \
     return *AA;                                                                \
   }
 
@@ -4795,7 +4794,6 @@ const char AAMemoryBehavior::ID = 0;
       SWITCH_PK_CREATE(CLASS, IRP, IRP_CALL_SITE_RETURNED, CallSiteReturned)   \
       SWITCH_PK_CREATE(CLASS, IRP, IRP_CALL_SITE_ARGUMENT, CallSiteArgument)   \
     }                                                                          \
-    AA->initialize(A);                                                         \
     return *AA;                                                                \
   }
 
@@ -4820,7 +4818,9 @@ CREATE_FUNCTION_ONLY_ABSTRACT_ATTRIBUTE_
 
 CREATE_NON_RET_ABSTRACT_ATTRIBUTE_FOR_POSITION(AAMemoryBehavior)
 
+#undef CREATE_FUNCTION_ONLY_ABSTRACT_ATTRIBUTE_FOR_POSITION
 #undef CREATE_FUNCTION_ABSTRACT_ATTRIBUTE_FOR_POSITION
+#undef CREATE_NON_RET_ABSTRACT_ATTRIBUTE_FOR_POSITION
 #undef CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION
 #undef CREATE_ALL_ABSTRACT_ATTRIBUTE_FOR_POSITION
 #undef SWITCH_PK_CREATE




More information about the llvm-commits mailing list