]> granicus.if.org Git - llvm/commitdiff
[Attributor][FIX] Remove initialize calls and add undefs
authorJohannes Doerfert <jdoerfert@anl.gov>
Mon, 7 Oct 2019 23:28:54 +0000 (23:28 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Mon, 7 Oct 2019 23:28:54 +0000 (23:28 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373987 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/Attributor.cpp

index 0bd454d88658d5ff12946b1a139ae88ab288a5a6..f314f69755ff0773b9c6419000d5c0f946894ebd 100644 (file)
@@ -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_FOR_POSITION(AAHeapToStack)
 
 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