Pat Haugen wrote:
Is there a reason REG_POINTER isn't propagated to the target register for
rtl insns of the form "reg_x = regP_y + reg_z", where regP_y is a reg
marked as REG_POINTER?

Probably historical oversight.

However, note that the hppa-hp-hpux port relies on the REG_POINTER settings being conservatively correct. This is because it uses segmented addresses, and in a reg+reg address, it requires knowing which one is the pointer when emitting assembly language. If REG_POINTER is set for things that aren't actually pointer values, then the hppa-hp-hpux port can break. I'd think it would be safe to add the reg=reg+reg case here, but it should be checked.

The aliasing code could perhaps be using the newer REG_ATTRS field instead of REG_POINTER. REG_EXPR didn't exist when alias.c was written, and may help here. Or maybe not. The REG_EXPR case in reg_scan_mark_refs is even more restrictive than the REG_POINTER code; it doesn't handle REG+CONST.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

Reply via email to