Summary: | pure functions cause things to be call clobbered still | ||
---|---|---|---|
Product: | gcc | Reporter: | Andrew Pinski <pinskia> |
Component: | tree-optimization | Assignee: | Daniel Berlin <dberlin> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | dberlin, gcc-bugs, kazu |
Priority: | P2 | Keywords: | alias, missed-optimization |
Version: | 4.1.0 | ||
Target Milestone: | 4.2.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2005-12-13 19:07:06 |
Description
Andrew Pinski
2005-10-09 17:24:46 UTC
Actually, it's not related at all. This is just a bug. Assigning to Daniel Berlin per his request. Subject: Bug 24287 CVSROOT: /cvs/gcc Module name: gcc Branch: improved-aliasing-branch Changes by: dberlin@gcc.gnu.org 2005-10-19 14:00:53 Modified files: gcc : ChangeLog.iab passes.c tree-dfa.c tree-flow.h tree-ssa-alias.c tree-ssa-operands.c tree-ssa-structalias.c gcc/cp : ptree.c Added files: gcc/testsuite/gcc.dg/tree-ssa: pr24287.c Log message: 2005-10-18 Daniel Berlin <dberlin@dberlin.org> Fix PR tree-optimization/24287 * tree-dfa.c (dump_variable): Print reasons for call clobbering. * tree-flow.h (struct ptr_info_def): Add escape mask to pointer. (ESCAPE_TRANSITIVE): Removed. (ESCAPE_TO_PURE_CONST): New. (ESCAPE_IS_PARM): New. (ESCAPE_UNKNOWN): New. * tree-ssa-alias.c (set_initial_properties): Incoming pointers are value escaping. Pointers that point to anything are not. Use pointer escape mask. (is_escape_site): Use ESCAPE_TO_PURE_CONST. * tree-ssa-operands.c (add_call_clobber_ops): Clean up a bit. Things that *only* escape to pure/const functions are only read by pure/const functions, and are not clobbered by the non-pure/const functions. (add_call_read_ops): Cleanup. * tree-ssa-structalias.c (update_alias_info): Use pi->escape_mask, not v_ann. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.iab.diff?cvsroot=gcc&only_with_tag=improved-aliasing-branch&r1=1.1.2.13&r2=1.1.2.14 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/passes.c.diff?cvsroot=gcc&only_with_tag=improved-aliasing-branch&r1=2.109.2.7&r2=2.109.2.8 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-dfa.c.diff?cvsroot=gcc&only_with_tag=improved-aliasing-branch&r1=2.63.4.6&r2=2.63.4.7 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-flow.h.diff?cvsroot=gcc&only_with_tag=improved-aliasing-branch&r1=2.132.2.8&r2=2.132.2.9 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-alias.c.diff?cvsroot=gcc&only_with_tag=improved-aliasing-branch&r1=2.109.4.11&r2=2.109.4.12 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-operands.c.diff?cvsroot=gcc&only_with_tag=improved-aliasing-branch&r1=2.100.4.7&r2=2.100.4.8 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-structalias.c.diff?cvsroot=gcc&only_with_tag=improved-aliasing-branch&r1=2.27.2.10&r2=2.27.2.11 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ptree.c.diff?cvsroot=gcc&only_with_tag=improved-aliasing-branch&r1=1.51&r2=1.51.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr24287.c.diff?cvsroot=gcc&only_with_tag=improved-aliasing-branch&r1=NONE&r2=1.1.2.1 Is this PR fixed? Or does it need some follow-up work? Subject: Re: pure functions cause things to
be call clobbered still
On Sun, 2005-12-18 at 15:48 +0000, kazu at gcc dot gnu dot org wrote:
>
> ------- Comment #5 from kazu at gcc dot gnu dot org 2005-12-18 15:48 -------
> Is this PR fixed? Or does it need some follow-up work?
>
It's fixed on improved-aliasing.
I'm merging the required changes.
Confirmed fixed by: 2006-01-16 Daniel Berlin <dberlin@dberlin.org> |