On Tue, Oct 8, 2013 at 4:15 PM, Andrew MacLeod <amacl...@redhat.com> wrote: > On 10/08/2013 09:18 AM, Richard Biener wrote: >> >> On Tue, Oct 8, 2013 at 2:58 PM, Andrew MacLeod <amacl...@redhat.com> >> wrote: >>> >>> >>>> I just took a quick stab at it... I think its pretty involved and >>>> someone >>>> with better loop comprehension should probably look at the followup of >>>> removing that requirement. estimate_numbers_of_iterations_loop() in >>>> particular uses last_stmt(), so it requires gimple.. and there is >>>> sprinkling >>>> of gimple specific stuff all through it... I have no idea how this is >>>> suppose to work for rtl. >>>> >>>> This is the way it is now, so at least by including that header, it >>>> exposes the hidden problem and either I can revisit it later, or someone >>>> else can tackle that. it seems *really* messy. >>>> >>>> OK as is for now? >>>> >>>> Andrew >>> >>> heh, make it available, and it will get used :-) It hasn't been this >>> that >>> way that long. >> >> Well, that's just accessing already computed and preserved max-iteration. >> >> That is, the accessors used by loop-*.c should probably be moved to >> cfgloop.[ch]. >> >> > huh, deeper than I intended to go but not too bad. OK... how about this > as an add-on to the previous patch. I'd just check in the combination all > at once. A couple of the functions needed to be separated... so I created > get_estimated_loop_iterations() and get_max_loop_iterations()... hopefully I > did that right. basically I pulled out everything but the scev estimating,a > dn left that in the original. This bootstraps, and regression tests are > running. > > Assuming it all works out, is this ok?
YEs, that looks good. THanks, Richard. > Andrew >