[LLVMbugs] [Bug 6842] New: inliner inlines recursive call, defeats loop-deletion

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 15 00:25:20 PDT 2010


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

           Summary: inliner inlines recursive call, defeats loop-deletion
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Interprocedural Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: gohman at apple.com
                CC: llvmbugs at cs.uiuc.edu


In opt -O2 on the attached testcase, there is a loop in the output which is
dead but not deleted.

The loop comes from a simple tail-recursive function.

The inliner is inlining the recursive function into itself (one level).

In this testcase, the function has a single exit, but inlining it into itself
causes it to have two exits. When tailcallelim visits it, the function turns
into a loop and the two exits turn into two loop exits. Loop deletion doesn't
know how do delete loops with multiple exits.

-- 
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