[llvm-bugs] [Bug 38208] New: Huge static analysis performance regression for very simple testcase

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 18 00:37:28 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38208

            Bug ID: 38208
           Summary: Huge static analysis performance regression for very
                    simple testcase
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: abramo.bagnara at bugseng.com
                CC: llvm-bugs at lists.llvm.org

$ cat p.c
int foo(int a, int b) {
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  a += b; b -= a;
  return a + b;
}
$ time scan-build-6.0 gcc -c /tmp/p.c
scan-build: Using '/usr/lib/llvm-6.0/bin/clang' for static analysis
scan-build: Removing directory '/tmp/scan-build-2018-07-18-093847-29397-1'
because it contains no reports.
scan-build: No bugs found.

real    0m0,110s
user    0m0,058s
sys     0m0,033s
$ time scan-build-7 gcc -c /tmp/p.c
scan-build: Using '/usr/lib/llvm-7/bin/clang' for static analysis
scan-build: Removing directory '/tmp/scan-build-2018-07-18-093759-29380-1'
because it contains no reports.
scan-build: No bugs found.

real    0m24,952s
user    0m24,912s
sys     0m0,020s

Every single line added to the sequence in source above more than doubles the
execution time.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180718/7b01a869/attachment.html>


More information about the llvm-bugs mailing list