public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/36258]  New: remove useless edge split  in copy_loop_headers
@ 2008-05-18  8:24 zhouyi04 at ios dot cn
  2008-05-18 16:59 ` [Bug tree-optimization/36258] " rguenth at gcc dot gnu dot org
  0 siblings, 1 reply; 3+ messages in thread
From: zhouyi04 at ios dot cn @ 2008-05-18  8:24 UTC (permalink / raw)
  To: gcc-bugs

The function copy_loop_headers after duplicate the region for a loop, 
237       /* Ensure that the latch and the preheader is simple (we know that
they
238          are not now, since there was the loop exit condition.  */
239       split_edge (loop_preheader_edge (loop));
240       split_edge (loop_latch_edge (loop));
241     }

In fact, the statements in line 239 and 240 are useless because there will
be no code motion optimizing (for example loop invariant movement) related to
that splitting in this pass, and the edges created by above statements are
removed by cfg cleanup in execute_todo that follows. 

I have comment out the statements of line 239 and 240, and bootstraped and
tested on Linux i686 i686 i686 GNU/Linux.

I also compared the output asm files on about 2000 C files under gcc.c-torture,
there is no difference when compiled using the compilers before commenting out
above statements and after commenting out the statements.

Thanks alot
Zhouyi Zhou


-- 
           Summary: remove useless edge split  in copy_loop_headers
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zhouyi04 at ios dot cn
 GCC build triplet: Linux i686 i686 i686 GNU/Linux
  GCC host triplet: Linux i686 i686 i686 GNU/Linux
GCC target triplet: Linux i686 i686 i686 GNU/Linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36258


^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <bug-36258-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2021-08-24  6:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-18  8:24 [Bug tree-optimization/36258] New: remove useless edge split in copy_loop_headers zhouyi04 at ios dot cn
2008-05-18 16:59 ` [Bug tree-optimization/36258] " rguenth at gcc dot gnu dot org
     [not found] <bug-36258-4@http.gcc.gnu.org/bugzilla/>
2021-08-24  6:52 ` rguenth at gcc dot gnu.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).