This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/18535] New: fix_irreducible_loops could be improved


If get_loop_exit_edges would return a VEC (edges) instead of a malloced array, we could improve the 
else stament of when we get the edges to be just an assigment of the SUCCS so we don't have an extra 
setting loop in this case.

The code in quesiton:
      if (bb->loop_father->header == bb)
        edges = get_loop_exit_edges (bb->loop_father, &n_edges);
      else  
        {
          n_edges = EDGE_COUNT (bb->succs);
          edges = xmalloc (n_edges * sizeof (edge));
          FOR_EACH_EDGE (e, ei, bb->succs)
            edges[ei.index] = e;
        } 
(we do not write to edges after this).
See how we just set the edges array to the edge.

-- 
           Summary: fix_irreducible_loops could be improved
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: enhancement
          Priority: P2
         Component: middle-end
        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=18535


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]