public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug optimization/15268] New: [tree-ssa] return statements are not combined on the tree level @ 2004-05-03 17:19 pinskia at gcc dot gnu dot org 2004-05-03 17:23 ` [Bug optimization/15268] " pinskia at gcc dot gnu dot org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-05-03 17:19 UTC (permalink / raw) To: gcc-bugs The following code (Derived from PR 15245) is not optimized to "return 0;" on the tree level. char *f(char *x) { char *ret = (char*)0; if( x > (char*)1 ) { if(x) return (char*)0; } return ret; } -- Summary: [tree-ssa] return statements are not combined on the tree level Product: gcc Version: tree-ssa Status: UNCONFIRMED Keywords: pessimizes-code, memory-hog, compile-time-hog, TREE Severity: enhancement Priority: P2 Component: optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15268 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug optimization/15268] [tree-ssa] return statements are not combined on the tree level 2004-05-03 17:19 [Bug optimization/15268] New: [tree-ssa] return statements are not combined on the tree level pinskia at gcc dot gnu dot org @ 2004-05-03 17:23 ` pinskia at gcc dot gnu dot org 2004-05-24 21:35 ` [Bug tree-optimization/15268] " pinskia at gcc dot gnu dot org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-05-03 17:23 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-03 17:23 ------- Confirmed. The reason why I put memory-hog and compile-time-hog is because the conversion from tree to RTL is costly and also there are more basic blocks in rtl which is removed later on. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2004-05-03 17:23:33 date| | Target Milestone|--- |tree-ssa http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15268 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/15268] [tree-ssa] return statements are not combined on the tree level 2004-05-03 17:19 [Bug optimization/15268] New: [tree-ssa] return statements are not combined on the tree level pinskia at gcc dot gnu dot org 2004-05-03 17:23 ` [Bug optimization/15268] " pinskia at gcc dot gnu dot org @ 2004-05-24 21:35 ` pinskia at gcc dot gnu dot org 2004-06-04 19:38 ` kazu at cs dot umass dot edu ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-05-24 21:35 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.5.0 |--- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15268 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/15268] [tree-ssa] return statements are not combined on the tree level 2004-05-03 17:19 [Bug optimization/15268] New: [tree-ssa] return statements are not combined on the tree level pinskia at gcc dot gnu dot org 2004-05-03 17:23 ` [Bug optimization/15268] " pinskia at gcc dot gnu dot org 2004-05-24 21:35 ` [Bug tree-optimization/15268] " pinskia at gcc dot gnu dot org @ 2004-06-04 19:38 ` kazu at cs dot umass dot edu 2004-06-07 17:59 ` pinskia at gcc dot gnu dot org 2004-07-09 7:10 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: kazu at cs dot umass dot edu @ 2004-06-04 19:38 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From kazu at cs dot umass dot edu 2004-06-04 19:38 ------- The last tree-ssa form looks like so: f (x) { char * ret; <bb 0>: if (x_2 > 1B) goto <L0>; else goto <L2>; <L0>:; if (x_2 != 0B) goto <L1>; else goto <L2>; <L1>:; return 0B; <L2>:; return 0B; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15268 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/15268] [tree-ssa] return statements are not combined on the tree level 2004-05-03 17:19 [Bug optimization/15268] New: [tree-ssa] return statements are not combined on the tree level pinskia at gcc dot gnu dot org ` (2 preceding siblings ...) 2004-06-04 19:38 ` kazu at cs dot umass dot edu @ 2004-06-07 17:59 ` pinskia at gcc dot gnu dot org 2004-07-09 7:10 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-06-07 17:59 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-07 17:59 ------- Fixed by: 2004-06-07 Richard Henderson <rth@redhat.com> * gimple-low.c (struct lower_data): Add the_return_label and one_return_stmt. (lower_function_body): Initialize and use them. (lower_return_expr): New. (lower_stmt): Call it. * gimplify.c (gimplify_return_expr): Force the argument to be either null or a result_decl. * tree-gimple.c: Update gimple grammer to match. * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Deny coalescing of result_decls. -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15268 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/15268] [tree-ssa] return statements are not combined on the tree level 2004-05-03 17:19 [Bug optimization/15268] New: [tree-ssa] return statements are not combined on the tree level pinskia at gcc dot gnu dot org ` (3 preceding siblings ...) 2004-06-07 17:59 ` pinskia at gcc dot gnu dot org @ 2004-07-09 7:10 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-07-09 7:10 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15268 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-07-09 7:10 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-05-03 17:19 [Bug optimization/15268] New: [tree-ssa] return statements are not combined on the tree level pinskia at gcc dot gnu dot org 2004-05-03 17:23 ` [Bug optimization/15268] " pinskia at gcc dot gnu dot org 2004-05-24 21:35 ` [Bug tree-optimization/15268] " pinskia at gcc dot gnu dot org 2004-06-04 19:38 ` kazu at cs dot umass dot edu 2004-06-07 17:59 ` pinskia at gcc dot gnu dot org 2004-07-09 7:10 ` pinskia 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).