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]
Other format: [Raw text]

[LNO] Update scev after tree_duplicate_loop_to_header_edge...


After tree_duplicate_loop_to_header_edge, scev info is stale if it was
available. I encountered this on apple-ppc branch where we have code
to call tree_duplicate_loop_to_header... from auto vectorizer. Plan is
to bring that patch in LNO in stages so that it does not disturb LNO to
Mainline merge. Meanwhile this patch resets scev info.

Bootstrapped and tested on powerpc-darwin.

2004-07-07 Devang Patel <dpatel@apple.com>

* Makefile.in (tree-ssa-loop-manip.o): Add tree-scalar-evolution.h
dependency.
* tree-scalar-evolution.c (scev_rest): Check scalar_evolution_info
and current_loops.
* tree-ssa-loop-manip.c (tree-scalar-evolution.h): Include.
(tree_duplicate_loop_to_header_edge): scev_reset () in the end.
--
Devang


diff -c3p -r fsf.lno.base/gcc/Makefile.in fsf.lno/gcc/Makefile.in
*** fsf.lno.base/gcc/Makefile.in Wed Jun 30 21:24:33 2004
--- fsf.lno/gcc/Makefile.in Wed Jul 7 09:26:43 2004
*************** tree-ssa-loop-ivopts.o : tree-ssa-loop-i
*** 1694,1700 ****
tree-ssa-loop-manip.o : tree-ssa-loop-manip.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) \
output.h diagnostic.h $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
! tree-pass.h cfglayout.h
tree-ssa-loop-niter.o : tree-ssa-loop-niter.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) cfgloop.h $(PARAMS_H) tree-inline.h \
output.h diagnostic.h $(TM_H) coretypes.h $(TREE_DUMP_H) flags.h \
--- 1694,1700 ----
tree-ssa-loop-manip.o : tree-ssa-loop-manip.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) \
output.h diagnostic.h $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
! tree-pass.h cfglayout.h tree-scalar-evolution.h
tree-ssa-loop-niter.o : tree-ssa-loop-niter.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) cfgloop.h $(PARAMS_H) tree-inline.h \
output.h diagnostic.h $(TM_H) coretypes.h $(TREE_DUMP_H) flags.h \
Only in fsf.lno/gcc: Makefile.in.~1.903.2.158.2.36.~
diff -c3p -r fsf.lno.base/gcc/tree-scalar-evolution.c fsf.lno/gcc/tree-scalar-evolution.c
*** fsf.lno.base/gcc/tree-scalar-evolution.c Sun Jun 27 21:47:46 2004
--- fsf.lno/gcc/tree-scalar-evolution.c Wed Jul 7 09:25:22 2004
*************** scev_reset (void)
*** 2469,2474 ****
--- 2469,2477 ----
unsigned i;
struct loop *loop;


+ if (!scalar_evolution_info || !current_loops)
+ return;
+
htab_empty (scalar_evolution_info);
for (i = 1; i < current_loops->num; i++)
{
Only in fsf.lno/gcc: tree-scalar-evolution.c.~1.1.2.64.~
diff -c3p -r fsf.lno.base/gcc/tree-ssa-loop-manip.c fsf.lno/gcc/tree-ssa-loop-manip.c
*** fsf.lno.base/gcc/tree-ssa-loop-manip.c Thu Jun 17 11:25:13 2004
--- fsf.lno/gcc/tree-ssa-loop-manip.c Wed Jul 7 11:05:26 2004
*************** Software Foundation, 59 Temple Place - S
*** 35,40 ****
--- 35,41 ----
#include "cfgloop.h"
#include "tree-pass.h"
#include "cfglayout.h"
+ #include "tree-scalar-evolution.h"


static basic_block lv_adjust_loop_entry_edge (basic_block, basic_block, edge,
tree);
*************** tree_duplicate_loop_to_header_edge (stru
*** 453,458 ****
--- 454,460 ----
set_phi_def_stmts (bb->rbi->original);
}


+   scev_reset ();
  #ifdef ENABLE_CHECKING
    verify_loop_closed_ssa ();


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