This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Better support for computed gotos
- To: gcc at gcc dot gnu dot org
- Subject: Better support for computed gotos
- From: Brad Lucier <lucier at math dot purdue dot edu>
- Date: Tue, 28 Aug 2001 19:31:39 -0500 (EST)
- Cc: lucier at math dot purdue dot edu (Brad Lucier)
The routine I've been trying to compile while profiling cc1
has 5291 target labels for 2624 computed goto's. That's nearly
14,000,000 abnormal, critical edges. Otherwise, it has
7166 regular goto's, 6351 "if"s, 818 "else"s, no while's,
for's, switch'es, ... So other than the 14,000,000 critical, abnormal
edges, it has fewer than 40,000 edges, say, even allowing for
fall-through edges.
In many places, the compiler can't do much with abnormal, critical edges,
yet these edges are mixed in with the 40,000 regular edges, and are often
tests in the branches of ifs whose bodies consist of "break;" or
"continue;" or "abort();" etc.
There are 19 lines in all the files of the gcc directory that contain
EDGE_COMPLEX, 33 that contain EDGE_ABNORMAL, and 15 that contain
EDGE_CRITICAL. I suggest that if those 14,000,000 abnormal, critical
edges were encoded as two tables of 5291 target labels and 2624
computed goto's, together with some links to the basic blocks that
the target labels head, and if the few routines that actually need to
note the existence of abnormal, critical edges were changed to use
these tables, that the time that cc1 needs to compile files like
this would decrease dramatically.
Brad Lucier