On 08/12/2016 03:13 AM, Bin Cheng wrote:
Hi,
This is a simple refactoring patch which can help long compile time issue 
reported as PR72855.
Basically, it moves cheaper checks before expensive ones.  By doing this, 
doloop -optimization
fails on cheap checks, thus following expensive data-flow analysis is skipped.
Bill helped bootstrap/test on powerpc64le-unknown-linux-gnu.  Is it OK?

Thanks,
bin

2016-08-12  Bin Cheng  <bin.ch...@arm.com>

        PR rtl-optimization/72855
        * loop-doloop.c (doloop_insn_valid_p): New function.
        (doloop_valid_p): Rename to...
        (doloop_niter_valid_p): ...this.  Factor out insn check to function
        doloop_insn_valid_p.
        (doloop_optimize): Update uses.

Presumably it's the call into the IV code that you're trying to avoid, right?

I'd issue distinct messages for the !doloop_insn_valid_p and !doloop_niter_valid_p cases. Then you can include the testcase and check for which of the two exit paths you took from doloop_optimize to ensure you're getting the early exit you want.

OK with that change.

jeff

Reply via email to