[LLVMbugs] [Bug 11388] New: Allow getSCEVAtScope/ComputeBackEdgeTakenCount to handle multiple loop exits

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 15 16:42:08 PST 2011


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: unassignedbugs at nondot.org
        ReportedBy: atrick at apple.com
                CC: llvmbugs at cs.uiuc.edu
        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.



More information about the llvm-bugs mailing list