This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Fix handling of function calls with side effects
- From: Diego Novillo <dnovillo at redhat dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 26 Mar 2004 18:43:53 -0500
- Subject: Re: [tree-ssa] Fix handling of function calls with side effects
- Organization: Red Hat Canada
- References: <1080335874.4600.202.camel@localhost.localdomain>
On Fri, 2004-03-26 at 16:17, Diego Novillo wrote:
> + /* Clobber memory for asm ("" : : : "memory"); */
> + if (global_var
> + || bitmap_first_set_bit (call_clobbered_vars) >= 0)
>
As pointed out by Richard, this is always true. Fixed with
* tree-ssa-operands.c (get_stmt_operands): Remove always-true
predicate.
Index: tree-ssa-operands.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-operands.c,v
retrieving revision 1.1.2.18
diff -d -c -p -r1.1.2.18 tree-ssa-operands.c
*** tree-ssa-operands.c 26 Mar 2004 21:11:49 -0000 1.1.2.18
--- tree-ssa-operands.c 26 Mar 2004 23:29:40 -0000
*************** get_stmt_operands (tree stmt)
*** 770,780 ****
}
/* Clobber memory for asm ("" : : : "memory"); */
! if (global_var
! || bitmap_first_set_bit (call_clobbered_vars) >= 0)
! for (link = ASM_CLOBBERS (stmt); link; link = TREE_CHAIN (link))
! if (!strcmp (TREE_STRING_POINTER (TREE_VALUE (link)), "memory"))
! add_call_clobber_ops (stmt, &prev_vops);
}
break;
--- 770,778 ----
}
/* Clobber memory for asm ("" : : : "memory"); */
! for (link = ASM_CLOBBERS (stmt); link; link = TREE_CHAIN (link))
! if (!strcmp (TREE_STRING_POINTER (TREE_VALUE (link)), "memory"))
! add_call_clobber_ops (stmt, &prev_vops);
}
break;