[LLVMdev] steens-aa

Will Dietz willdtz at gmail.com
Sun Aug 22 20:25:28 PDT 2010


Hi Dineth,

There's a bug in DSA on 2.6 that marked everything incomplete.  It's
since been fixed, although the current HEAD is a work-in-progress...
I'm not sure how it compares to the stability/results of 2.6 (assuming
using 2.7 is even an option for you).  Not really prepared to make
that kind of assessment presently.

The issue you describe was fixed in r105302, but DSA was restructured
a bit since then so the patch won't apply cleanly to 2.6.

Attached is a hack of a fix, that simply says if the code has a call
to va_start mark all nodes incomplete since the behavior isn't modeled
correctly in 2.6 DSA anyway.  Should work fine as long as you aren't
analyzing code with var-arg function definitions.

Hope this helps,

~Will Dietz

On Sun, Aug 22, 2010 at 4:37 PM, Dineth <dineth2007 at gmail.com> wrote:
> I'm trying to use steens-aa from poolalloc on llvm-2.6. However, when
> I run the alias analysis, steens aa falls back on default aa because
> the DSNodes are incomplete. My  program is very simple. The default aa
> identifies that &a and &c.b cannot alias but d can alias with both of
> them. I use the AliasAnalysis.alias method to find out pairwise from
> within my own analysis which of the values alias. When I run opt I
> passed -steens-aa  as an option. Can someone please tell me what  I'm
> doing wrong here.
>
> Thanks.
>
> bar(long **p)
> {
> }
>
> main(){
>  long *a;
>  struct foo {
>   long *b;
>  } c;
>  long **d = NULL;
>
>  bar (&a);
>  bar (&c.b);
>  bar (d);
>  return 0;
> }
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_vararg.diff
Type: application/octet-stream
Size: 1015 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100822/fb07e760/attachment.obj>


More information about the llvm-dev mailing list