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]

Re: [lno] some cleanups for scev


On Thu, Apr 15, 2004 at 10:23:36PM +0200, Zdenek Dvorak wrote:
> 
> I have thought about the matter more; I agree there are cases when
> having these things kept in symbolic form may be useful.
> 

This patch enables the symbolic params again.  Bootstrapped on 
amd64-unknown-freebsd5.2

Zdenek, many thanks for the review.

	* tree-scalar-evolution.c (compute_scalar_evolution_in_loop): 
	Use superloop_at_depth.
	(analyze_scalar_evolution): Keep a symbolic form instead of
	chrec_top.

Index: tree-scalar-evolution.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-scalar-evolution.c,v
retrieving revision 1.1.2.36
diff -c -3 -p -r1.1.2.36 tree-scalar-evolution.c
*** tree-scalar-evolution.c	21 Apr 2004 07:54:32 -0000	1.1.2.36
--- tree-scalar-evolution.c	21 Apr 2004 11:27:30 -0000
*************** compute_scalar_evolution_in_loop (struct
*** 2586,2594 ****
    if (def_loop == wrto_loop)
      return ev;
  
!   while (def_loop->outer != wrto_loop)
!     def_loop = def_loop->outer;
! 
    return compute_scalar_evolution_after_loop (def_loop, ev);
  }
  
--- 2586,2592 ----
    if (def_loop == wrto_loop)
      return ev;
  
!   def_loop = superloop_at_depth (def_loop, wrto_loop->depth + 1);
    return compute_scalar_evolution_after_loop (def_loop, ev);
  }
  
*************** analyze_scalar_evolution (struct loop *l
*** 2734,2739 ****
--- 2732,2740 ----
      }
  
    res = analyze_scalar_evolution_1 (loop, var, get_scalar_evolution (var));
+ 
+   if (TREE_CODE (var) == SSA_NAME && res == chrec_top)
+     res = var;
  
    if (dump_file && (dump_flags & TDF_DETAILS))
      fprintf (dump_file, ")\n");


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