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 BOOT_CFLAGS='-O3'


tree-if-conv.c, only enabled with -O3, was missing code to handle
debug stmts so as to avoid codegen changes and pass bootstrap-debug.
With this patch, bootstrap-debug with -O3 passed on x86 and x86_64.
Patches to fix ia64 and ppc64 will follow momentarily.

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

	* tree-if-conv.c (tree_if_convert_stmt): Handle debug stmts.
	(if_convertible_stmt_p): Likewise.

Index: gcc/tree-if-conv.c
===================================================================
--- gcc/tree-if-conv.c.orig	2008-02-19 03:40:19.000000000 -0300
+++ gcc/tree-if-conv.c	2008-05-06 05:14:46.000000000 -0300
@@ -1,5 +1,5 @@
 /* If-conversion for vectorizer.
-   Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
    Contributed by Devang Patel <dpatel@apple.com>
 
 This file is part of GCC.
@@ -214,7 +214,7 @@ tree_if_conversion (struct loop *loop, b
 }
 
 /* if-convert stmt T which is part of LOOP.
-   If T is a GIMPLE_MODIFY_STMT than it is converted into conditional modify
+   If T is a GIMPLE_MODIFY_STMT then it is converted into conditional modify
    expression using COND.  For conditional expressions, add condition in the
    destination basic block's predicate list and remove conditional
    expression itself. BSI is the iterator used to traverse statements of
@@ -237,6 +237,12 @@ tree_if_convert_stmt (struct loop *  loo
     case LABEL_EXPR:
       break;
 
+    case VAR_DEBUG_VALUE:
+      /* ??? Should there be conditional VAR_DEBUG_VALUEs?  */
+      VAR_DEBUG_VALUE_VALUE (bsi_stmt (*bsi)) = VAR_DEBUG_VALUE_NOVALUE;
+      update_stmt (bsi_stmt (*bsi));
+      break;
+
     case GIMPLE_MODIFY_STMT:
       /* This GIMPLE_MODIFY_STMT is killing previous value of LHS. Appropriate
 	 value will be selected by PHI node based on condition. It is possible
@@ -429,8 +435,10 @@ if_convertible_stmt_p (struct loop *loop
     case LABEL_EXPR:
       break;
 
-    case GIMPLE_MODIFY_STMT:
+    case VAR_DEBUG_VALUE:
+      break;
 
+    case GIMPLE_MODIFY_STMT:
       if (!if_convertible_gimple_modify_stmt_p (loop, bb, stmt))
 	return false;
       break;
-- 
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]