This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/18535] New: fix_irreducible_loops could be improved
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Nov 2004 01:29:52 -0000
- Subject: [Bug middle-end/18535] New: fix_irreducible_loops could be improved
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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