2008/8/14 Daniel Berlin <[EMAIL PROTECTED]>:
> 1. You can't assume VUSE's are must-aliases. The fact that there is a
> vuse for something does not imply it is must-used, it implies it is
> may-used.
>
> We do not differentiate may-use from must-use in our alias system. You
> can do some trivial must-use analysis if you like (by computing
> cardinality of points-to set as either single or multiple and
> propagating/meeting it in the right place).
>
> Must-use is actually quite rare.
Then, is it impossible to distinguish the following testcase and the
one from my previous mail with the current infrastructure?
extern void foo (int *);
extern void bar (int);
void
baz (void)
{
int i;
if (i) /* { dg-warning "is used uninitialized" "uninit i warning" } */
bar (i);
foo (&i);
}
> 2. " if (!gimple_references_memory_p (def))
> + return;
> +"
> Is nonsensical the SSA_NAME_DEF_STMT of a vuse must contain a vdef,
> and thus must access memory.
Two things here.
1) The case I am trying to war about is:
# BLOCK 2 freq:10000
# PRED: ENTRY [100.0%] (fallthru,exec)
[/home/manuel/src/trunk/gcc/testsuite/gcc.dg/uninit-B.c : 12] # VUSE
<iD.1951_4(D)> { iD.1951 }
i.0D.1952_1 = iD.1951;
[/home/manuel/src/trunk/gcc/testsuite/gcc.dg/uninit-B.c : 12] if
(i.0D.1952_1 != 0)
The def_stmt of i.0 is precisely that one. There is no vdef there.
2) I use that test to return early if the def_stmt of "t" does not
reference memory. t is just a SSA_NAME (like i.0 above), I do not know
whether its def_stmt has a VUSE like the above or not. I guess the
test is redundant since SINGLE_SSA_USE_OPERAND will return NULL
anyway. Is that what yo mean?
Cheers,
Manuel.