USE patch vs the PA

John Carr jfc@tiac.net
Fri Oct 24 19:00:00 GMT 1997


> There were basically three problems with the alias code.  I'll write
> them up in more detail later this weekend.
> 
>   * Didn't handle autoincrement addressing.  It just punted.
>   autoincrement addresses can be treated just like a set of the
>   base value to itself plus a small constant.

I thought it would work with autoincrement addressing.  It uses
note_stores to detect sets, and note_stores only looks for explicit
sets.

>   * find_base_value (psuedo) would return the pseudo instead of
>   the base value of the pseudo.

That's how it was intended to work.  Insns are not scanned in the same
order they are executed.  Consider insns which appear in rtl in this
order:

(1)	R1 = constant
(2)	R2 = R1
(3)	R1 = variable

If the instructions are executed in the order (3), (2), (1) due to
labels and branches then R2 will not have a known value.

The current find_base_value handles this case by marking R2 as having the
same base value as R1, a value which is not yet known and might be NULL.
Only after all insns have been seen and the base value of R1 is known can
R2 be assigned a legitimate base value.

If there are no labels between (1) and (2) then the code is too
conservative.  Handling that case is not hard; I'm not sure how helpful it
would be.




More information about the Gcc mailing list