[LLVMbugs] [Bug 3232] New: Disable gcc inliner

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Dec 17 23:44:46 PST 2008


           Summary: Disable gcc inliner
           Product: tools
           Version: 2.2
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: code-quality
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: clattner at apple.com
                CC: llvmbugs at cs.uiuc.edu

llvm-gcc is running the GCC tree-inliner as well as the llvm inliner.  This has
certain advantages, but also brings certain problems.  For example, it
seriously unrolls code like this C++ code (which is a huge code size problem
and not really a win):

#include <stdio.h>
template< typename X >
inline X factorial( X n )  {
    if ( n )
      return n * factorial(n - 1);
    return 1;
int main(){
  double x = factorial( ( double )19 );
  printf( "factorial( (double)19 ): %f\n", x );
  return 0;

$ llvm-gcc main.opt.cpp -S -o - -emit-llvm -O3 -mllvm -disable-llvm-optzns

Which is basically horrible.  Turning off the GCC inliner would also fix Bug
2999, but we have to watch out for 2353.


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