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

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Nov 18 01:29:00 GMT 2004


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



More information about the Gcc-bugs mailing list