------- Additional Comments From law at redhat dot com  2005-01-17 18:33 -------
Subject: Re:  DSE is not doing its job for
        global variables

On Thu, 2005-01-13 at 20:38 +0000, steven at gcc dot gnu dot org wrote:
> ------- Additional Comments From steven at gcc dot gnu dot org  2005-01-13 
> 20:38 -------
> Hmpf, does DSE do anything *at* *all*???
Yes.


 foo( int *a)
{
  *a  =5;
  *a = 3;
}


>From the .dse1 dump:


 ;; Function foo (foo)

  Deleted dead store '*a_1 = 5'
foo (a)
{
  # BLOCK 0
  # PRED: ENTRY [100.0%]  (fallthru)
  *a_1 = 3;
  return;
  # SUCC: EXIT [100.0%]

}

Your tests fail because of the mixture of V_MUST_DEF and V_MAY_DEFs
as well as the aliasing for the references through i and *p in the
first test and the aliasing between l & m in the second test.

I wouldn't expect my change to handle V_MUST_DEF to fix the first
test.


Feel free to improve :-)

Jeff



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18880

Reply via email to