This is the mail archive of the 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]

Better support for computed gotos

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

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