This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/44194] struct returned by value generates useless stores
- From: "xinliangli at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 Jun 2011 23:16:48 +0000
- Subject: [Bug rtl-optimization/44194] struct returned by value generates useless stores
- Auto-submitted: auto-generated
- References: <bug-44194-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44194
davidxl <xinliangli at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xinliangli at gmail dot com
--- Comment #23 from davidxl <xinliangli at gmail dot com> 2011-06-15 23:14:50 UTC ---
(In reply to comment #22)
> > The DSE patch still leaves 2 redundant stores.
>
> OK, I missed this, reopening...
>
> > The following patch will enable DSE to remove those two stores. Does this
> > look ok?
>
> Calling into the gimplifier from the RTL expander doesn't look appropriate.
>
> More fundamentally, it's a little unfortunate to spill to memory a value
> returned in registers. Can we try to use emit_group_move_into_temps here
> instead (under the appropriate circumstances)?
It would be nice if the expander does not spill the return into memory in the
first place if possible. On other hand tagging compiler created memory
location with temp decls so that aliaser has the symbolic information seems a
useful mechanism.
Easwaran, can you post the patch to gcc-patches for more comments?
Thanks,
David