This is the mail archive of the gcc-patches@gcc.gnu.org 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]
Other format: [Raw text]

Re: [RFC] tree-cfg.c: Check that a nonlocal label doesn't appearin the middle of a basic block.


Hi Andrew,

> What is happen is that we now have two labels that are computed goto
> types but only referenced as for just getting the address and not
> actually reachable otherwise.  It might be reasonable to split the
> BB but that takes up more memory than just allowing this special
> case since we know that non local gotos and real computed goto would
> have an abnormal edge to them and not be moved around.

Is there a local label between those two nonlocal labels?

Well, we should keep things straight so that we can determine whether
a given basic block is a target of a nonlocal goto by checking to see
if the first statement of the basic block is a nonlocal label.
Alternatively, we can use loop to walk through labels, looking for a
nonlocal label, but that's probably not desired.

Whatever we do, we should have clear "grammar" of statements in a
basic block and check that in tree_verify_flow_info.  As far as I have
learned so far, the "grammar" is something like

  zero or one forced label
  zero or more nonlocal labels
  zero or more local labels
  other statements
  zero or one control stmt

Kazu Hirata


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