[LLVMbugs] [Bug 14047] New: Inliner still needs some tweaking for recursive functions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 9 16:36:05 PDT 2012


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

             Bug #: 14047
           Summary: Inliner still needs some tweaking for recursive
                    functions
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Interprocedural Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9324
  --> http://llvm.org/bugs/attachment.cgi?id=9324
testcase

Now that pr13700 is fixed I tried removing some of the noinlines we added to
mozilla because of it. Unfortunately, llvm is still fairly aggressive in
inlining into a recursive function.

In the attached testcase gcc 4.7 produces a EmitTree function that uses about
360 bytes of stack frame. By changing TotalAllocaSizeRecursiveCaller in llvm I
got:

1    -> 88   bytes
2    -> 88   bytes
4    -> 88   bytes
8    -> 88   bytes
16   -> 88   bytes
32   -> 88   bytes
64   -> 824  bytes
128  -> 1000 bytes
256  -> 1336 bytes
512  -> 1336 bytes
1024 -> 1336 bytes

Maybe TotalAllocaSizeRecursiveCaller should be a ratio?

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