<div dir="ltr">yeah, that'd be great!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 7, 2022 at 6:42 AM Johannes Doerfert <<a href="mailto:johannes@jdoerfert.de">johannes@jdoerfert.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The problem is that we had to "open" the namespace more and more<br>
anyway to allow us to implement methods declared in the header in<br>
a reasonable location. That said. I can re-introduce them with smaller<br>
scope, as the coding standard suggests, one class at a time.<br>
<br>
Would that work for you?<br>
<br>
~ Johannes<br>
<br>
<br>
On 2/6/22 21:43, David Blaikie wrote:<br>
> This seems unfortunate and not consistent with LLVM or general C++ style -<br>
> if these types are only in the .cpp file they really should be in anonymous<br>
> namespaces. (<br>
> <a href="https://llvm.org/docs/CodingStandards.html#anonymous-namespaces" rel="noreferrer" target="_blank">https://llvm.org/docs/CodingStandards.html#anonymous-namespaces</a> ) - could<br>
> you describe in more detail what motivated this change?<br>
><br>
> On Mon, Jan 31, 2022 at 11:11 PM Johannes Doerfert via llvm-commits <<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
><br>
>> Author: Johannes Doerfert<br>
>> Date: 2022-02-01T01:07:50-06:00<br>
>> New Revision: a5b6aef24e7a3f2a74cc4e716314d3f8d424d1c1<br>
>><br>
>> URL:<br>
>> <a href="https://github.com/llvm/llvm-project/commit/a5b6aef24e7a3f2a74cc4e716314d3f8d424d1c1" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/a5b6aef24e7a3f2a74cc4e716314d3f8d424d1c1</a><br>
>> DIFF:<br>
>> <a href="https://github.com/llvm/llvm-project/commit/a5b6aef24e7a3f2a74cc4e716314d3f8d424d1c1.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/a5b6aef24e7a3f2a74cc4e716314d3f8d424d1c1.diff</a><br>
>><br>
>> LOG: [Attributor][NFCI] Remove anonymous namespaces<br>
>><br>
>> The namespaces made it more complicate to implement static helpers,<br>
>> among other things. We should not need them at all.<br>
>><br>
>> Added:<br>
>><br>
>><br>
>> Modified:<br>
>>      llvm/lib/Transforms/IPO/AttributorAttributes.cpp<br>
>><br>
>> Removed:<br>
>><br>
>><br>
>><br>
>><br>
>> ################################################################################<br>
>> diff  --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp<br>
>> b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp<br>
>> index 76420783b2d1..ea3f449b649a 100644<br>
>> --- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp<br>
>> +++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp<br>
>> @@ -1026,7 +1026,6 @@ struct AA::PointerInfo::State : public AbstractState<br>
>> {<br>
>>     BooleanState BS;<br>
>>   };<br>
>><br>
>> -namespace {<br>
>>   struct AAPointerInfoImpl<br>
>>       : public StateWrapper<AA::PointerInfo::State, AAPointerInfo> {<br>
>>     using BaseTy = StateWrapper<AA::PointerInfo::State, AAPointerInfo>;<br>
>> @@ -5085,7 +5084,6 @@ struct AANoCaptureCallSiteReturned final :<br>
>> AANoCaptureImpl {<br>
>>       STATS_DECLTRACK_CSRET_ATTR(nocapture)<br>
>>     }<br>
>>   };<br>
>> -} // namespace<br>
>><br>
>>   /// ------------------ Value Simplify Attribute<br>
>> ----------------------------<br>
>><br>
>> @@ -5106,7 +5104,6 @@ bool<br>
>> ValueSimplifyStateType::unionAssumed(Optional<Value *> Other) {<br>
>>     return true;<br>
>>   }<br>
>><br>
>> -namespace {<br>
>>   struct AAValueSimplifyImpl : AAValueSimplify {<br>
>>     AAValueSimplifyImpl(const IRPosition &IRP, Attributor &A)<br>
>>         : AAValueSimplify(IRP, A) {}<br>
>> @@ -7378,7 +7375,6 @@ void<br>
>> AAMemoryBehaviorFloating::analyzeUseIn(Attributor &A, const Use &U,<br>
>>     if (UserI->mayWriteToMemory())<br>
>>       removeAssumedBits(NO_WRITES);<br>
>>   }<br>
>> -} // namespace<br>
>><br>
>>   /// -------------------- Memory Locations Attributes<br>
>> ---------------------------<br>
>>   /// Includes read-none, argmemonly, inaccessiblememonly,<br>
>> @@ -7412,7 +7408,6 @@ std::string<br>
>> AAMemoryLocation::getMemoryLocationsAsStr(<br>
>>     return S;<br>
>>   }<br>
>><br>
>> -namespace {<br>
>>   struct AAMemoryLocationImpl : public AAMemoryLocation {<br>
>><br>
>>     AAMemoryLocationImpl(const IRPosition &IRP, Attributor &A)<br>
>> @@ -9790,8 +9785,6 @@ struct AAAssumptionInfoCallSite final :<br>
>> AAAssumptionInfoImpl {<br>
>>     }<br>
>>   };<br>
>><br>
>> -} // namespace<br>
>> -<br>
>>   AACallGraphNode *AACallEdgeIterator::operator*() const {<br>
>>     return static_cast<AACallGraphNode *>(const_cast<AACallEdges *>(<br>
>>         &A.getOrCreateAAFor<AACallEdges>(IRPosition::function(**I))));<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> llvm-commits mailing list<br>
>> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
>> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
>><br>
</blockquote></div>