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

            Bug ID: 42924
           Summary: Address Sanitizer compilation time regression
           Product: new-bugs
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: ch...@detrino.org
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

I have a large TU that used to take 8 minutes to compile with Clang 8.0 and now
takes 1 hour and 20 minutes with Clang 9.0 RC1 when using -fsanitize=address.

Using the new -ftime-trace flag showed that most of the time was going towards
AddressSanitizerFunctionPass which is taking ~40ms for each function. As this
is being compiled with -O1 nothing is being inlined and that 40ms times number
of functions is adding up to more than an hour.

Further profiling showed that all the time is being spent in memmove for
copying a GlobalsMetadata type on the following line:

https://github.com/llvm/llvm-project/blob/7f7ef0208b57a4d253cd8b07053460f40ad7cbc8/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp#L581

Git blame on that line points to https://reviews.llvm.org/D56470 and it has
some discussion on copying the GlobalsMD struct.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to