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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot       |aldyh at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2012-09-05 
21:15:52 UTC ---
What I was trying to test here originally was whether the LIM pass kept a flag
of changes to "count" and only if the flag was true, allow the cached version
of "count" to be stored.

Technically, I could get away with only checking the presence of count_lsm_flag
in the dump, though I realize that this also is an imperfect solution if a
previous pass changed things around.

Apart from checking count_lsm_flag, the only thing I can think of is replacing
this test with one within the simulate-thread/ infrastructure that actually
checks that no caching occurs unless p->data > 0.

Richard, which solution do you prefer, or do you recommend something else?

void func()
{
  struct obj *p;
  for (p = q; p; p = p->next)
    if (p->data > 0)
      count++;
}

Reply via email to