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]

[patch] for PR 21967


Hello,

this patch fixes two testsuite failures (loop-2 and loop-4) caused
by the fact that variables contained in TMR_ORIGINAL were expanded
even if they were not used anywhere else.

Bootstrapped & regtested on i686.

Zdenek

	PR testsuite/21967
	* tree-ssa-live.c (mark_all_vars_used_1): Ignore variables in
	TMR_ORIGINAL.

Index: tree-ssa-live.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-live.c,v
retrieving revision 2.38
diff -c -3 -p -r2.38 tree-ssa-live.c
*** tree-ssa-live.c	7 Jun 2005 14:30:25 -0000	2.38
--- tree-ssa-live.c	24 Jun 2005 14:02:40 -0000
*************** change_partition_var (var_map map, tree 
*** 286,291 ****
--- 286,292 ----
      map->partition_to_var[map->compact_to_partition[part]] = var;
  }
  
+ static inline void mark_all_vars_used (tree *);
  
  /* Helper function for mark_all_vars_used, called via walk_tree.  */
  
*************** mark_all_vars_used_1 (tree *tp, int *wal
*** 295,300 ****
--- 296,312 ----
  {
    tree t = *tp;
  
+   /* Ignore TREE_ORIGINAL for TARGET_MEM_REFS, as well as other
+      fields that do not contain vars.  */
+   if (TREE_CODE (t) == TARGET_MEM_REF)
+     {
+       mark_all_vars_used (&TMR_SYMBOL (t));
+       mark_all_vars_used (&TMR_BASE (t));
+       mark_all_vars_used (&TMR_INDEX (t));
+       *walk_subtrees = 0;
+       return NULL;
+     }
+ 
    /* Only need to mark VAR_DECLS; parameters and return results are not
       eliminated as unused.  */
    if (TREE_CODE (t) == VAR_DECL)


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