[LLVMbugs] [Bug 3810] New: [irgen[ O(N^2) algorithm in deferred decl generation

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Mar 14 23:39:23 PDT 2009


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

           Summary: [irgen[ O(N^2) algorithm in deferred decl generation
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: daniel at zuster.org
                CC: llvmbugs at cs.uiuc.edu


--
ddunbar at frank:tmp$ cat bad.py
import sys

print 'extern int g0();'
print 
print 'static int f0() { return g0(); }'
N = int(sys.argv[1])
for i in range(1, N+1):
    print 'static int f%d() { return f%d(); }' % (i, i-1)

print
print 'int g1() { return f%d(); }' % N
ddunbar at frank:tmp$ python bad.py 1000 > t.c && time clang -emit-llvm-only t.c

real    0m0.595s
user    0m0.592s
sys     0m0.000s
ddunbar at frank:tmp$ python bad.py 2000 > t.c && time clang -emit-llvm-only t.c

real    0m1.770s
user    0m1.760s
sys     0m0.004s
ddunbar at frank:tmp$ python bad.py 4000 > t.c && time clang -emit-llvm-only t.c

real    0m6.439s
user    0m6.212s
sys     0m0.036s
--


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