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]

[vta] fix bootstrap-debug with -O3 on ppc64


Without this patch, we'd attempt to generate VOPs for debug stmts.

Apparently this also fixes an infinite loop regression that would have
been introduced in today's patchset, while bootstrapping on ppc64 with
default BOOT_CFLAGS or -O3, but it seems very odd that this is what
fixes it.  I think it must have been something else, but in the
interest of full disclosure, I thought I'd mention it.

for  gcc/ChangeLog.vta
from  Alexandre Oliva  <aoliva@redhat.com>

	* tree-ssa-operands.c (add_virtual_operands): Assert no debug use.
	(get_expr_operands): Pass opf_no_vops along with opf_debug_use.
	Move none into the right scope.

Index: gcc/tree-ssa-operands.c
===================================================================
--- gcc/tree-ssa-operands.c.orig	2008-02-19 04:12:33.000000000 -0300
+++ gcc/tree-ssa-operands.c	2008-05-10 21:03:42.000000000 -0300
@@ -1471,6 +1471,8 @@ add_virtual_operand (tree var, stmt_ann_
      ADDR_EXPR expression).  */
   if (flags & opf_no_vops)
     return;
+
+  gcc_assert ((flags & opf_debug_use) == 0);
   
   if (MTAG_P (var))
     aliases = MTAG_ALIASES (var);
@@ -2085,11 +2087,14 @@ get_expr_operands (tree stmt, tree *expr
   enum tree_code_class codeclass;
   tree expr = *expr_p;
   stmt_ann_t s_ann = stmt_ann (stmt);
-  int uflags = opf_use | (flags & opf_debug_use);
+  int uflags = opf_use;
 
   if (expr == NULL)
     return;
 
+  if ((flags & opf_debug_use) != 0)
+    uflags |= (flags & (opf_debug_use | opf_no_vops));
+
   code = TREE_CODE (expr);
   codeclass = TREE_CODE_CLASS (code);
 
@@ -2169,7 +2174,6 @@ get_expr_operands (tree stmt, tree *expr
       {
 	tree ref;
 	HOST_WIDE_INT offset, size, maxsize;
-	bool none = true;
 
 	if (TREE_THIS_VOLATILE (expr))
 	  s_ann->has_volatile_ops = true;
@@ -2186,6 +2190,7 @@ get_expr_operands (tree stmt, tree *expr
 	    subvar_t svars = get_subvars_for_var (ref);
 	    unsigned int i;
 	    tree subvar;
+	    bool none = true;
 
 	    for (i = 0; VEC_iterate (tree, svars, i, subvar); ++i)
 	      {
-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member       ÂSÃ Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}

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