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.


bar(long **p)

  long *a;
  struct foo {
   long *b;
  } c;
  long **d = NULL;

  bar (&a);
  bar (&c.b);
  bar (d);
  return 0;

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

fix_vararg.diff (1015 Bytes)