[PATCH] D21110: [CFLAA] Add yet another StratifiedAttr

George Burgess IV via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 15:44:00 PDT 2016


I think we're arguing for more or less the same thing here.

The whole point of AttrArgs/AttrGlobals was to say "a value in this set
came (directly, through a load, ...)" from this specific arg/global. If we
take this patch, that becomes "a value in this set came through a load of"
a specific arg/global, which is presumably not more useful than
AttrUnknown. So, if this goes in as-is, we should probably kill
AttrArg/AttrGlobal as well, because they have no purpose.

A more interesting approach may be basically flipping this patch upside
down: only use AttrArg/AttrGlobal when we have an assign edge to
args/globals, and put AttrUnknown on the sets under the ones marked with
AttrArg/AttrGlobal. Obviously, that would only be useful if we think
differentiating between args/globals would be useful. If we don't think
this, then I'm happy to accept this patch with the removal of
Attr{Arg,Global}.

> it is not clear to me how AttrGlobal/AttrArgs can be utilized there. I
was thinking maybe we should get rid of them at some point

When making arg attrs/global attrs, my thoughts were "this might be useful.
If not, it'll take a few minutes to refactor this down to a single bit.
Let's be flexible." I don't have a concrete plan for how they'll be useful.
I'd assumed it would be useful when used with interprocedural magicks, but
if that's not possible, that's fine. :)

That said, I'm reluctant to do that few minutes of refactoring now rather
than later (unless it's a maintenance burden) if it's reasonably possible
that we would find this information useful in the relatively near future.

On Wed, Jun 8, 2016 at 3:16 PM, Jia Chen <grievejia at gmail.com> wrote:

> grievejia updated this revision to Diff 60109.
> grievejia marked 5 inline comments as done.
> grievejia added a comment.
>
> Updated according to George's review
>
>
> http://reviews.llvm.org/D21110
>
> Files:
>   lib/Analysis/CFLAliasAnalysis.cpp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160608/64380798/attachment.html>


More information about the llvm-commits mailing list