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] kill handling of non-gimple address


Hi,
after Richard's change, this should be no longer needed.
2003-11-25  Jan Hubicka  <jh@suse.cz>
	* fold-const.c (nondestructive_fold_binary_to_constant): Avoid unnecesary
	handling of non-gimple address expressions.
Index: fold-const.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v
retrieving revision 1.213.2.64
diff -c -3 -p -r1.213.2.64 fold-const.c
*** fold-const.c	24 Nov 2003 20:28:55 -0000	1.213.2.64
--- fold-const.c	25 Nov 2003 22:53:27 -0000
*************** nondestructive_fold_binary_to_constant (
*** 9143,9152 ****
        /* (plus (address) (const_int)) is a constant.  */
        if (TREE_CODE (op0) == PLUS_EXPR
  	  && TREE_CODE (op1) == INTEGER_CST
! 	  && (TREE_CODE (TREE_OPERAND (op0, 0)) == ADDR_EXPR
! 	      || (TREE_CODE (TREE_OPERAND (op0, 0)) == NOP_EXPR
! 		  && (TREE_CODE (TREE_OPERAND (TREE_OPERAND (op0, 0), 0))
! 		      == ADDR_EXPR)))
  	  && TREE_CODE (TREE_OPERAND (op0, 1)) == INTEGER_CST)
  	{
            return build (PLUS_EXPR, type, TREE_OPERAND (op0, 0),
--- 9143,9149 ----
        /* (plus (address) (const_int)) is a constant.  */
        if (TREE_CODE (op0) == PLUS_EXPR
  	  && TREE_CODE (op1) == INTEGER_CST
! 	  && TREE_CODE (TREE_OPERAND (op0, 0)) == ADDR_EXPR
  	  && TREE_CODE (TREE_OPERAND (op0, 1)) == INTEGER_CST)
  	{
            return build (PLUS_EXPR, type, TREE_OPERAND (op0, 0),


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