[LLVMdev] AliasAnalysis refactoring for the new pass manager

Duncan P. N. Exon Smith
Tue, 16 Jun 2015 00:11:47 -0000

> On 2015-Jun-15, at 16:29, Chandler Carruth <chandlerc at gmail.com>
wrote:
>
> On Mon, Jun 15, 2015 at 3:56 PM Duncan P. N. Exon Smith <dexonsmith at
apple.com> wrote:
> I like this colour:
>
>     enum class AliasKind /* or AliasCategory? */ {
>       Null,
>       Unknown,
>       Partial,
>       Complete
>     };
>
> So, the only non-bikeshed-color argument I have (which is also referenced
by Philip, but i couldn't reply to both) suggests we *really* want NoAlias,
> MayAlias, and MustAlias, because these are terms of art in the literature
(confirmed by DannyB who is a reasonable expert in alias analysis literature).
I'm inclined to keep these names as a consequence. The natural extension is
PartialAlias.

Sad that "alias" is sometimes a noun and sometimes a verb, but if
it's in the literature, then I guess that's that.

Might be better to have "NoAlias" be the only one that treats
"alias"
as a noun though.  PartiallyAlias?  PartlyAlias?  (But since it's
inconsistent anyway, then PartialAlias isn't all bad.)

> That leaves the question of the enumeration name. I think
"AliasResult" is my new found favorite. Danny gave me a reason: these
are really results of a particular query, not just abstract kinds of aliasing...
And its shorter than AliasRelationship. =]
>
> Thoughts?

I don't really see how it's better than AliasKind, but I don't see
anything wrong with it either.