This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/70847] [6/7 Regression] exponential time in cp_fold for chained virtual function calls


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70847

Franz Sirl <sirl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sirl at gcc dot gnu.org

--- Comment #6 from Franz Sirl <sirl at gcc dot gnu.org> ---
Created attachment 38612
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38612&action=edit
Testcase for -fsanitize=alignment

For this testcase compiled with -fsanitize=alignment/-fsanitize=undefined the
patch from comment#3 only shaves off about 4 seconds. The compiletime still
roughly doubles with each string added to the operator<< chain.

1)
time g++-6 -fsanitize=alignment tc3.cpp -c -ftime-report

Execution times (seconds)
 phase setup             :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall 
  1575 kB (54%) ggc
 phase parsing           : 143.08 (100%) usr   0.00 ( 0%) sys 143.09 (100%)
wall     756 kB (26%) ggc
 phase opt and generate  :   0.02 ( 0%) usr   0.00 ( 0%) sys   0.02 ( 0%) wall 
   597 kB (20%) ggc
 register information    :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall 
     0 kB ( 0%) ggc
 parser function body    : 143.08 (100%) usr   0.00 ( 0%) sys 143.09 (100%)
wall     151 kB ( 5%) ggc
 integrated RA           :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall 
    49 kB ( 2%) ggc
 initialize rtl          :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall 
    12 kB ( 0%) ggc
 TOTAL                 : 143.10             0.00           143.12              
2939 kB

real    2m23.132s
user    2m23.108s
sys     0m0.008s

2)
g++-6 -v
Using built-in specs.
COLLECT_GCC=g++-6
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/6/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada,go
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/6
--enable-ssp --disable-libssp --disable-libvtv --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--with-default-libstdcxx-abi=gcc4-compatible
--enable-version-specific-runtime-libs --enable-linker-build-id
--enable-linux-futex --program-suffix=-6 --without-system-libunwind
--enable-multilib --with-arch-32=x86-64 --with-tune=generic
--build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
gcc version 6.1.1 20160531 (SUSE Linux)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]