public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug middle-end/36326] New: gimplification of aggregate copies introduces extra aggregate copy @ 2008-05-25 16:32 rguenth at gcc dot gnu dot org 2008-05-25 16:48 ` [Bug middle-end/36326] " rguenth at gcc dot gnu dot org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: rguenth at gcc dot gnu dot org @ 2008-05-25 16:32 UTC (permalink / raw) To: gcc-bugs union X { int i; double x; }; int foo (union X *p) { union X x = *p; return x.x; } produces union X x.0; x.0 = *p; x = x.0; this is not optimized at any point. Using a struct instead usually SRA is able to remove the extra copy. -- Summary: gimplification of aggregate copies introduces extra aggregate copy Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36326 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/36326] gimplification of aggregate copies introduces extra aggregate copy 2008-05-25 16:32 [Bug middle-end/36326] New: gimplification of aggregate copies introduces extra aggregate copy rguenth at gcc dot gnu dot org @ 2008-05-25 16:48 ` rguenth at gcc dot gnu dot org 2008-05-25 17:19 ` rguenth at gcc dot gnu dot org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: rguenth at gcc dot gnu dot org @ 2008-05-25 16:48 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from rguenth at gcc dot gnu dot org 2008-05-25 16:47 ------- Caused by the fix for PR17526. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- OtherBugsDependingO| |17526 nThis| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36326 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/36326] gimplification of aggregate copies introduces extra aggregate copy 2008-05-25 16:32 [Bug middle-end/36326] New: gimplification of aggregate copies introduces extra aggregate copy rguenth at gcc dot gnu dot org 2008-05-25 16:48 ` [Bug middle-end/36326] " rguenth at gcc dot gnu dot org @ 2008-05-25 17:19 ` rguenth at gcc dot gnu dot org 2008-05-27 14:29 ` matz at gcc dot gnu dot org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: rguenth at gcc dot gnu dot org @ 2008-05-25 17:19 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from rguenth at gcc dot gnu dot org 2008-05-25 17:18 ------- Which was just a workaround. It needs proper fixing so that Index: tree-gimple.c =================================================================== --- tree-gimple.c (revision 135859) +++ tree-gimple.c (working copy) @@ -116,10 +116,7 @@ is_gimple_mem_rhs (tree t) a renamed variable. Also force a temporary if the type doesn't need to be stored in memory, since it's cheap and prevents erroneous tailcalls (PR 17526). */ - if (is_gimple_reg_type (TREE_TYPE (t)) - || (TYPE_MODE (TREE_TYPE (t)) != BLKmode - && (TREE_CODE (t) != CALL_EXPR - || ! aggregate_value_p (t, t)))) + if (is_gimple_reg_type (TREE_TYPE (t))) return is_gimple_val (t); else return is_gimple_formal_tmp_rhs (t); doesn't regress. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36326 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/36326] gimplification of aggregate copies introduces extra aggregate copy 2008-05-25 16:32 [Bug middle-end/36326] New: gimplification of aggregate copies introduces extra aggregate copy rguenth at gcc dot gnu dot org 2008-05-25 16:48 ` [Bug middle-end/36326] " rguenth at gcc dot gnu dot org 2008-05-25 17:19 ` rguenth at gcc dot gnu dot org @ 2008-05-27 14:29 ` matz at gcc dot gnu dot org 2008-05-28 8:06 ` pinskia at gcc dot gnu dot org 2008-12-03 15:12 ` rguenth at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: matz at gcc dot gnu dot org @ 2008-05-27 14:29 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from matz at gcc dot gnu dot org 2008-05-27 14:28 ------- Subject: Bug 36326 Author: matz Date: Tue May 27 14:28:02 2008 New Revision: 136033 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136033 Log: PR middle-end/36326 * tree-gimple.c (is_gimple_mem_rhs): Remove work-around for non-BLKmode types. * tree-tailcall.c (find_tail_calls): Don't mark calls storing into memory as tail calls. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-gimple.c trunk/gcc/tree-tailcall.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36326 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/36326] gimplification of aggregate copies introduces extra aggregate copy 2008-05-25 16:32 [Bug middle-end/36326] New: gimplification of aggregate copies introduces extra aggregate copy rguenth at gcc dot gnu dot org ` (2 preceding siblings ...) 2008-05-27 14:29 ` matz at gcc dot gnu dot org @ 2008-05-28 8:06 ` pinskia at gcc dot gnu dot org 2008-12-03 15:12 ` rguenth at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2008-05-28 8:06 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from pinskia at gcc dot gnu dot org 2008-05-28 08:05 ------- Fixed. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED Target Milestone|--- |4.4.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36326 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/36326] gimplification of aggregate copies introduces extra aggregate copy 2008-05-25 16:32 [Bug middle-end/36326] New: gimplification of aggregate copies introduces extra aggregate copy rguenth at gcc dot gnu dot org ` (3 preceding siblings ...) 2008-05-28 8:06 ` pinskia at gcc dot gnu dot org @ 2008-12-03 15:12 ` rguenth at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: rguenth at gcc dot gnu dot org @ 2008-12-03 15:12 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from rguenth at gcc dot gnu dot org 2008-12-03 15:11 ------- Subject: Bug 36326 Author: rguenth Date: Wed Dec 3 15:10:03 2008 New Revision: 142396 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142396 Log: 2008-12-03 Richard Guenther <rguenther@suse.de> PR middle-end/36326 * gimplify.c (is_gimple_mem_or_call_rhs): Remove work-around for non-BLKmode types. * gcc.dg/tree-ssa/pr36326.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/pr36326.c Modified: trunk/gcc/ChangeLog trunk/gcc/gimplify.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36326 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-03 15:12 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-05-25 16:32 [Bug middle-end/36326] New: gimplification of aggregate copies introduces extra aggregate copy rguenth at gcc dot gnu dot org 2008-05-25 16:48 ` [Bug middle-end/36326] " rguenth at gcc dot gnu dot org 2008-05-25 17:19 ` rguenth at gcc dot gnu dot org 2008-05-27 14:29 ` matz at gcc dot gnu dot org 2008-05-28 8:06 ` pinskia at gcc dot gnu dot org 2008-12-03 15:12 ` rguenth at gcc dot gnu dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).