[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Duncan Sands baldrick at free.fr
Fri Jun 29 02:03:36 PDT 2007

Hi Evan,

> +/// propagateEHRegister - The specified EH register is required in a successor
> +/// of the EH landing pad. Propagate it (by adding it to livein) to all the
> +/// blocks in the paths between the landing pad and the specified block.

thanks for this fix.  For the moment we don't really need this much generality:
due to other problems (PR1508) we don't even try to handle the case where the
exception handling intrinsics are neither in the landing pad nor in an immediate
successor of the landing pad (we assert if this occurs).  Thus the attached
minimal fix is good enough until PR1508 is resolved (shall I commit it?).  Also,
I can't help feeling that the right way to solve the problem of reading the exception
register in some block potentially far away from the landing pad is: (1) add code to
the landing pad that writes the physical register to a virtual register; (2) turn
the eh.exception intrinsic into a read from the virtual register.  The problem is
that we are in ssa form during codegen, so doing this means inserting phi nodes etc
for the virtual register.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: eh_register.diff
Type: text/x-diff
Size: 2698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070629/93454049/attachment.diff>

More information about the llvm-commits mailing list