[PATCH] D23432: [AliasSetTracker] Degrade AliasSetTracker results when may-alias sets get too large.

Geoff Berry via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 08:44:20 PDT 2016



On 8/12/2016 7:11 PM, Hal Finkel via llvm-commits wrote:
> ----- Original Message -----
>> From: "Daniel Berlin" <dberlin at dberlin.org>
>> To: reviews+D23432+public+5838e63f935aeb78 at reviews.llvm.org, mkuper at google.com, davidxl at google.com
>> Cc: hfinkel at anl.gov, llvm-commits at lists.llvm.org
>> Sent: Friday, August 12, 2016 5:50:52 PM
>> Subject: Re: [PATCH] D23432: [AliasSetTracker] Degrade AliasSetTracker results when may-alias sets get too large.
>>
>> I suggested this offline on the internal bug as an approach.
>> Unioning (literally generating a fake union that has all the original
>> members pointers) works sanely in all languages but is tricky and
>> ugly in practice (and llvm has no unions anymore).
>> You can't pick representatives sanely any other way if you keep tbaa
>> because it is not transitive. Same with other types of info other
>> than uo. if you keep those, discovering valid subsets requires
>> querying every pair.
>>
>>
>> If you drop tbaa, etc, you can partition.
>>
> Right. You'd need to partition based on UO and then merge the AA metadata (you might be able to partition based on the AA metadata too, but not using the pair-wise AA interface -- you'd need something that understood the metadata semantics and could partition in bulk).
>
>> However consensus was long term to use memssa or something else,
>> rather than try to devise partitioning for a fundamentally n^2
>> representation
>>
> Okay. I can easily see how LICM would use MemorySSA. I suppose you can also partition in O(N) time using MemorySSA by walking the use/def graph to form equivalence classes (or maybe O(NlnN) in the presence of MemorySSA PHIs)?
>
>   -Hal

FWIW, I've been working on a patch to do just this.

>> On Fri, Aug 12, 2016, 3:25 PM Hal Finkel < hfinkel at anl.gov > wrote:
>>
>>
>> hfinkel added a subscriber: hfinkel.
>> hfinkel added a comment.
>>
>> There might not be anything we can do in general that is better than
>> this, but could we degrade to using summaries of some kind instead
>> of N^2 queries. For example, imagine that, in the degraded mode, we
>> represented each set using the result of GetUnderlyingObject and the
>> merged AA metadata. Then we queried using <Ptr, Size, AAMD> vs <UO,
>> UnknownSize, MergedAAMD>, but only once per set, not once per
>> pointer in each set? I'm trying to think of a way to keep getting
>> the easy cases, such as noalias function parameters, even if we
>> degrade on the hard things.
>>
>>
>> https://reviews.llvm.org/D23432
>>
>>
>>
>>

-- 
Geoff Berry
Employee of Qualcomm Datacenter Technologies, Inc.
  Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.  Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.



More information about the llvm-commits mailing list