Andrew Haley <[EMAIL PROTECTED]> writes:
> The problem that is bugging me is if there is more than one
> instruction in the repleacement sequence, which one do you copy the
> REG_FRAME_RELATED_EXPR to?
I think an algorithm which should work fairly reliably in the general
case is:
1) Are there any old insns with RTX_FRAME_RELATED_P set?
If no, stop.
2) For each old insn with RTX_FRAME_RELATED_P set:
a) if insn has a REG_FRAME_RELATED_EXPR note, add it to the list;
b) otherwise, insn should be a PARALLEL or SEQUENCE or SET;
add the insn to the list.
3) Set RTX_FRAME_RELATED_P on last new insn.
4) If there is more than one entry on list, turn it into a PARALLEL
(see dwarf2out_frame_debug_expr). Otherwise take first insn on
list.
5) Put the result of 4 in a REG_FRAME_RELATED_EXPR note on last new
insn.
Ian