Patch to fix incorrect hard register life information

Jason Merrill jason@cygnus.com
Fri Sep 4 02:28:00 GMT 1998


>>>>> Jeffrey A Law <law@cygnus.com> writes:

 >   In message < Pine.GSO.4.02A.9809021459580.21122-100000@matula.informatik.rwth-aachen.de >you write:
 >> The real problem is that flow makes edges in the cfg from the basic blocks
 >> that contain REG_LABEL notes for the eh_stub labels, but those labels are
 >> in fact reached from the last basic block.

 > If that's the case, then the solution is to fix the cfg we product.  An
 > inaccurate cfg leads to all kinds of problems.

 > So let's make sure I understand the problem.  There is one weird function
 > in libgcc2 where the last block needs an edge to a magic label?

The last block sets two registers and returns to a magic label, the eh
stub, which then adjusts sp and jumps to the handler.

The important bit is the setting of the registers.  flow needs to know that
the registers are live at the end of the last block, which can be handled
with USE insns (right?).  It also needs to know that they are set coming
into the eh stub.  Can this be handled with CLOBBERs?

One way to handle this situation would certainly be to make an edge from
the last block to the stub.  But conceptually, the stub is a separate
thing; it's only emitted inside __throw because that was easier to
implement.

 > Jason -- is there any other place where __builtin_eh_stub could be
 > expanded?  Is that particular builtin ever something a user can/should
 > use?

No.

Jason



More information about the Gcc-patches mailing list