From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12577 invoked by alias); 31 Jul 2003 16:33:34 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 12568 invoked by alias); 31 Jul 2003 16:33:33 -0000 Date: Thu, 31 Jul 2003 16:33:00 -0000 Message-ID: <20030731163333.12566.qmail@sources.redhat.com> From: "cvs-commit at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030629143256.11373.marcus@jet.franken.de> References: <20030629143256.11373.marcus@jet.franken.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug optimization/11373] [tree-ssa] asm generated lhs expressions are discarded X-Bugzilla-Reason: CC X-SW-Source: 2003-07/txt/msg03692.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11373 ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-07-31 16:33 ------- Subject: Bug 11373 CVSROOT: /cvs/gcc Module name: gcc Branch: tree-ssa-20020619-branch Changes by: dnovillo@gcc.gnu.org 2003-07-31 16:33:27 Modified files: gcc : ChangeLog.tree-ssa Makefile.in builtins.c expr.h tree-dfa.c tree-flow.h tree-ssa-ccp.c tree-ssa-dce.c tree-ssa-dom.c tree.h Log message: 2003-07-31 Diego Novillo * Makefile.in (tree-ssa-ccp.o): Depend on $(EXPR_H). * builtins.c (c_strlen): Remove static declaration. (simplify_builtin_fputs): Remove static declaration. (simplify_builtin_sprintf): New local function. (expand_builtin_sprintf): Remove by surrounding with #if 0. (expand_builtin): Add BUILT_IN_SPRINTF to the list of built-ins handed over to simplify_builtin. (validate_arglist): Do not allow arguments with TREE_SIDE_EFFECTS. (simplify_builtin_fputs): Add new argument KNOWN_LEN. If it's set, use it instead of trying to compute the length of the string. Update all callers. * expr.h (simplify_builtin_fputs): Declare. * tree-flow.h (fold_stmt): Change argument type to tree *. Update all users. * tree-ssa-ccp.c: Include expr.h. (replace_uses_in): If the statement makes a call to some selected built-ins, mark it for folding. (get_strlen): New local function. (ccp_fold_builtin): New local function. (fold_stmt): Call it. (set_rhs): Fix if-else-if chaining. Handle cases where the whole statement needs to be replaced. * tree.h (c_strlen): Declare. 2003-07-31 Diego Novillo Fix PR optimization/11373 * tree-ssa-dce.c (stmt_useful_p): Get statement operands before checking for volatile operands. * tree-dfa.c (get_expr_operands): If a constant is dereferenced as a pointer, mark the statement as having volatile operands. (may_access_global_mem_p): If a non-NULL constant is used as a pointer, consider it as pointing to global memory. * tree-ssa-dom.c (optimize_stmt): Set addr_expr_propagated_p when propagating pointers that are integer constants. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.544&r2=1.1.2.545 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.903.2.104&r2=1.903.2.105 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/builtins.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.152.2.27&r2=1.152.2.28 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.h.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.117.2.15&r2=1.117.2.16 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-dfa.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.4.137&r2=1.1.4.138 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-flow.h.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.4.97&r2=1.1.4.98 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-ccp.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.80&r2=1.1.2.81 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-dce.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.48&r2=1.1.2.49 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-dom.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.14&r2=1.1.2.15 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.342.2.85&r2=1.342.2.86