Take following code:
int g(void);
int h(void)
{
  int i = g();
  return 9;
}
int h1(void)
{
  g();
  return 9;
}

----
In h(), we could remove the assignment to i and this helps out a little in 
compile time when expanding 
to RTL.  DCE could be doing this but does not.  I thought about this issue when 
I was working on my 
quick and dirty DCE.

-- 
           Summary: Not removing a SSA_NAME which is not used
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to