This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] kill handling of non-gimple address
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: Tue, 25 Nov 2003 23:56:45 +0100
- Subject: [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),