On Fri, Aug 15, 2008 at 8:06 AM, Manuel López-Ibáñez <[EMAIL PROTECTED]> wrote: > 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?
If by current you mean "code that already exists", then yes :) You could write code to do further analysis, but with the existing code, it will not work. > >> 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. Sure but this is a default def, which are special, and do nothing anyway. > > 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? > No, i mean any SSA_NAME_DEF_STMT for a vuse that is not a default_def will reference memory.