[llvm-bugs] [Bug 43855] New: Longer compilation times

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 30 15:54:49 PDT 2019


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

            Bug ID: 43855
           Summary: Longer compilation times
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: leonardchan at google.com
                CC: llvm-bugs at lists.llvm.org

We noticed builds for zircon were taking longer than normal and were able to
trace the cause to
https://reviews.llvm.org/rGee50590e1684c197bc4336984795e48bf53c7a4e.

One of the files in our build in particular is taking almost 6x as long to
compile.

```
# clang revision ee50590e1684c197bc4336984795e48bf53c7a4e
$ time
~/llvm-monorepo/llvm-build-3-master-fuchsia-toolchain/install/bin/clang++ -o
user-x64-asan/obj/system/ulib/fbl/test/fbl-test.intrusive_doubly_linked_list_tests.cc.o
-DZX_DEBUGLEVEL=2 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D_ALL_SOURCE
-DWITH_FRAME_POINTERS=1 -fno-common --target=x86_64-fuchsia -mcx16
-fcrash-diagnostics-dir=clang-crashreports -fcolor-diagnostics
-no-canonical-prefixes -O2 -g3 -Wall -Wextra -Wno-unused-parameter
-Werror=unused-label -Werror=return-type -Wno-address-of-packed-member
-Wnewline-eof -Wno-unknown-warning-option -Wno-c99-designator
-Wno-int-in-bool-context -ffunction-sections -fdata-sections -Wthread-safety
-fvisibility=hidden -ftrivial-auto-var-init=pattern -Werror
-Wno-error=deprecated-declarations -fno-omit-frame-pointer -fsanitize=address
-Wno-unused-function -std=c++17 -Wconversion -Wno-sign-conversion -Wextra-semi
-Wno-deprecated-copy -ftemplate-backtrace-limit=0 -fno-exceptions -fno-rtti
-fno-threadsafe-statics -fvisibility-inlines-hidden -c ~/misc/reproducer.cc

real    7m3.756s
user    7m1.799s
sys     0m1.959s

# clang revision b8042dbe2bbf129cb524fca7a48737e99d1e46bc (the commit before
ee50590e1684c197bc4336984795e48bf53c7a4e)
$ time ../../prebuilt/third_party/clang/linux-x64/bin/clang++ -o
user-x64-asan/obj/system/ulib/fbl/test/fbl-test.intrusive_doubly_linked_list_tests.cc.o
-DZX_DEBUGLEVEL=2 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D_ALL_SOURCE
-DWITH_FRAME_POINTERS=1 -fno-common --target=x86_64-fuchsia -mcx16
-fcrash-diagnostics-dir=clang-crashreports -fcolor-diagnostics
-no-canonical-prefixes -O2 -g3 -Wall -Wextra -Wno-unused-parameter
-Werror=unused-label -Werror=return-type -Wno-address-of-packed-member
-Wnewline-eof -Wno-unknown-warning-option -Wno-c99-designator
-Wno-int-in-bool-context -ffunction-sections -fdata-sections -Wthread-safety
-fvisibility=hidden -ftrivial-auto-var-init=pattern -Werror
-Wno-error=deprecated-declarations -fno-omit-frame-pointer -fsanitize=address
-Wno-unused-function -std=c++17 -Wconversion -Wno-sign-conversion -Wextra-semi
-Wno-deprecated-copy -ftemplate-backtrace-limit=0 -fno-exceptions -fno-rtti
-fno-threadsafe-statics -fvisibility-inlines-hidden -c ~/misc/reproducer.cc

real    1m9.815s
user    1m8.764s
sys     0m1.055s
```

Reproducer attached. I can try to make the reducer smaller if it helps.

-- 
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/20191030/f9bf2b9d/attachment.html>


More information about the llvm-bugs mailing list