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: insn_code -> tree_code in tree-vect-transform.c


On Sat, May 26, 2007 at 12:33:09PM +0200, Rask Ingemann Lambertsen wrote:
> On Sat, May 26, 2007 at 12:35:32AM +0200, Thomas Neumann wrote:
> > Hi,
> > 
> > as of revision 125076, tree-vect-transform.c contains the following code
> > in line 2010:
> > 
> > enum tree_code code, code1 = CODE_FOR_nothing, code2 = CODE_FOR_nothing;
> 
>    SVN can help you find out who added that piece of code. Use the SVN command
> "blame" for bugs/regressions, "praise" for improvements or bug fixes and
> "annotate" when you're not sure if the change is good or not. SVN blame
> gives:
> 
> 124784       uros   enum tree_code code, code1 = CODE_FOR_nothing, code2 = CODE_FOR_nothing;
> 
>    SVN log tells you:
> 
> r124784 | uros | 2007-05-17 08:31:05 +0200 (tor, 17 maj 2007) | 75 lines
> 
>         PR tree-optimization/24659
> [...]
> 

Any value in code1/code2 is overridden in supportable_widening_operation
or supportable_narrowing_operation. Initialize them to ERROR_MARK looks
better.


H.J.
----
2007-05-26  H.J. Lu  <hongjiu.lu@intel.com>

	* tree-vect-transform.c (vectorizable_conversion): Initialize
	tree_code variables to ERROR_MARK.
	(vectorizable_type_demotion): Likewise.
	(vectorizable_type_promotion): Likewise.

--- gcc/tree-vect-transform.c.init	2007-05-18 07:10:44.000000000 -0700
+++ gcc/tree-vect-transform.c	2007-05-26 07:55:54.000000000 -0700
@@ -2007,7 +2007,7 @@ vectorizable_conversion (tree stmt, bloc
   tree vec_oprnd0 = NULL_TREE, vec_oprnd1 = NULL_TREE;
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
   loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
-  enum tree_code code, code1 = CODE_FOR_nothing, code2 = CODE_FOR_nothing;
+  enum tree_code code, code1 = ERROR_MARK, code2 = ERROR_MARK;
   tree decl1 = NULL_TREE, decl2 = NULL_TREE;
   tree new_temp;
   tree def, def_stmt;
@@ -2694,7 +2694,7 @@ vectorizable_type_demotion (tree stmt, b
   tree vec_oprnd0=NULL, vec_oprnd1=NULL;
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
   loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
-  enum tree_code code, code1 = CODE_FOR_nothing;
+  enum tree_code code, code1 = ERROR_MARK;
   tree new_temp;
   tree def, def_stmt;
   enum vect_def_type dt0;
@@ -2842,7 +2842,7 @@ vectorizable_type_promotion (tree stmt, 
   tree vec_oprnd0=NULL, vec_oprnd1=NULL;
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
   loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
-  enum tree_code code, code1 = CODE_FOR_nothing, code2 = CODE_FOR_nothing;
+  enum tree_code code, code1 = ERROR_MARK, code2 = ERROR_MARK;
   tree decl1 = NULL_TREE, decl2 = NULL_TREE;
   int op_type; 
   tree def, def_stmt;


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