http://llvm.org/bugs/show_bug.cgi?id=11388

             Bug #: 11388
           Summary: Allow getSCEVAtScope/ComputeBackEdgeTakenCount to
                    handle multiple loop exits
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: ASSIGNED
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
        Depends on: 11375
    Classification: Unclassified


The fix for PR11375 potentially disabled some optimization. Enabling this
optimization requires updating uses of getSCEVAtScope to indicate which loop
exit it wants the value for. I did not see significant benchmark regressions on
x86 or ARM, but two unit tests have been XFAIL'd until this optimization is
reimplemented:
Transforms/IndVarSimplify/loop_evaluate9.ll and loop_evaluate10.ll.

Additionally, ComputeBackEdgeTakenCount can be smarter. Some cases we could be
be optimistic with are: (1) the loop has unit stride (2) the last loop test is
less-than/greater-than (3) any loop test is less-than/greater-than AND
falls-through some constant times less then the other tests.

This applies to both BECount and MaxBECount.

Note that "back-edge-taken count" is the number of times the loop latch
branches to the loop header. This depends on all loop exit tests. Whereas the
"exit-not-taken count" is specific to a particular loop exit and only
applicable if the loop actually takes that exit.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to