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]

[tree-ssa, RFC] Non-gimple conversions produced by inliner


Hi,
inliner a = (type1)(type2)b during libjava build.  According to my
verifier this is not valid gimple, but is_gimple_rhs on rhs is happy
because it does not check operands.
What is the proper fix?  The patch bellow adds more checking into
inliner and it should catch all cases where we lose, but it is not
elegant at all.

Ideas?
Honza

2003-12-13  Jan Hubicka  <jh@suse.cz>
	* tree-inline.c (expand_call_inline):  Do more strict gimple checking.
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.26.2.71
diff -c -3 -p -r1.26.2.71 tree-inline.c
*** tree-inline.c	12 Dec 2003 23:32:15 -0000	1.26.2.71
--- tree-inline.c	13 Dec 2003 14:24:48 -0000
*************** DECL_ARGUMENTS (fn);
*** 815,821 ****
  	  /* If the conversion needed to assign VALUE to VAR is not a
  	     GIMPLE expression, flag that we will need to gimplify
  	     INIT_STMTS at the end.  */
! 	  if (!is_gimple_rhs (rhs))
  	    gimplify_init_stmts_p = true;
  	}
  
--- 815,825 ----
  	  /* If the conversion needed to assign VALUE to VAR is not a
  	     GIMPLE expression, flag that we will need to gimplify
  	     INIT_STMTS at the end.  */
! 	  if (!is_gimple_rhs (rhs)
! 	      || ((TREE_CODE (rhs) == NOP_EXPR
! 		   || TREE_CODE (rhs) == CONVERT_EXPR)
! 		  && (TREE_CODE (TREE_OPERAND (rhs, 0)) == NOP_EXPR
! 		      || TREE_CODE (TREE_OPERAND (rhs, 0)) == CONVERT_EXPR)))
  	    gimplify_init_stmts_p = true;
  	}
  


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