This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, PR target/65103, 2/3] Propagate address constants into loops for i386


2015-05-29 1:15 GMT+03:00 Jeff Law <law@redhat.com>:
>
> Right, but you're blindly propagating.  The right thing to do is look at
> some kind of metric to estimate when it's profitable to propagate the
> constant back in vs leave it hoisted out.

No, the patch is not to blindly propagate but to let loop invariant to
be propagated into address. Existing propagation gain estimation
(should_replace_address) still applies.

Thanks,
Ilya

>
> If you look at what Kugan is doing in cprop.c, that's exactly the approach
> he's taking -- looking at rtx costing to determine when to propagate the
> constant back into the loop.  It could probably be made better with some
> knowledge of register pressure and looking at whether or not all uses (vs
> just some uses) of the constant will be propagated.
>
> Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]