This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fix g++-law/copy1.C regression


This one's caused by the recent PROP_ALLOW_CFG_CHANGES addition as well.

Something (I didn't quite track down what) makes a CFG transformation
which results in the 0 return value being removed as dead code.  This
doesn't happen with optimization enabled, curiously.

In any case, it's silly to be doing this kind of work at -O0.


r~

        * flow.c (life_analysis): Elide PROP_ALLOW_CFG_CHANGES if
        not optimizing.

Index: flow.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flow.c,v
retrieving revision 1.448
diff -c -p -d -r1.448 flow.c
*** flow.c	2001/07/29 01:13:53	1.448
--- flow.c	2001/07/29 06:58:03
*************** life_analysis (f, file, flags)
*** 4115,4121 ****
  #endif
  
    if (! optimize)
!     flags &= ~(PROP_LOG_LINKS | PROP_AUTOINC);
  
    /* The post-reload life analysis have (on a global basis) the same
       registers live as was computed by reload itself.  elimination
--- 4115,4121 ----
  #endif
  
    if (! optimize)
!     flags &= ~(PROP_LOG_LINKS | PROP_AUTOINC | PROP_ALLOW_CFG_CHANGES);
  
    /* The post-reload life analysis have (on a global basis) the same
       registers live as was computed by reload itself.  elimination


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]