This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR target/65103, 2/3] Propagate address constants into loops for i386
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, rdsandiford at googlemail dot com
- Date: Mon, 1 Jun 2015 15:26:15 +0300
- Subject: Re: [PATCH, PR target/65103, 2/3] Propagate address constants into loops for i386
- Authentication-results: sourceware.org; auth=none
- References: <20150310150027 dot GC27860 at msticlxl57 dot ims dot intel dot com> <8761a22ecm dot fsf at googlemail dot com> <552CA415 dot 5060206 at redhat dot com> <CAMbmDYZ=Yd7vZ8tPZw36iCVtk5C7kzAiTdi8QuoWs627touB0g at mail dot gmail dot com> <20150417083445 dot GA6178 at msticlxl57 dot ims dot intel dot com> <5535E5B1 dot 9020309 at redhat dot com> <CAMbmDYbcLiU5QcQ053RF9PofPZWxjdrfDTNWffpWZvnV9pzAOA at mail dot gmail dot com> <5567939F dot 9060507 at redhat dot com>
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