------- Comment #14 from tobi at gcc dot gnu dot org  2006-01-09 16:46 -------
Coming to think of it, I think that while your speedup would work, it would
probably be easier and even faster if we kept track of the enclosing blocks
while building the blocks and labels, so that the data structure would look
something like this:

gfc_st_label *label -> gfc_code *block -> gfc_code *enclosing_block ...

or maybe

gfc_st_label *label -> gfc_code *statement -> gfc_code *block
        -> gfc_code *enclosing_block ...

(where label is a statement label, statement the statement its attached to,
block the block containing the statement [this would e.g. be an if], etc.)

Then the time taken by the validation of the blocks would still scale linearly
with the number of blocks, but the length of the blocks would no longer play a
role, leaving us with linear behavior. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18540


Reply via email to