On 03/15/2015 02:30 PM, Richard Sandiford wrote:
Ilya Enkovich <enkovich....@gmail.com> writes:
This patch allows propagation of loop invariants for i386 if propagated
value is a constant to be used in address operand. Bootstrapped and
tested on x86_64-unknown-linux-gnu. OK for trunk or stage 1?
Is it necessary for this to be a target hook? The concept doesn't seem
particularly target-specific. We should only propagate into the address
if the new cost is no greater than the old cost, but if the address
meets that condition and if propagating at this point in the pipeline is
a win on x86, then wouldn't it be a win for other targets too?
I agree with Richard here. I can't see a strong reason why this should
be a target hook.
Perhaps part of the issue here is the address costing metrics may not
have enough context to make good decisions. In which case what context
do they need?
Jeff