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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


--
ddun...@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
ddun...@frank:tmp$ python bad.py 1000 > t.c && time clang -emit-llvm-only t.c

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

real    0m1.770s
user    0m1.760s
sys     0m0.004s
ddun...@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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to