[Bug rtl-optimization/80318] GCC takes too much RAM and time compiling a template file (var-tracking)

2018-05-22 Thread benjamin.redelings at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80318

benjamin.redelings at gmail dot com changed:

   What|Removed |Added

Version|7.0.1   |8.1.0

--- Comment #4 from benjamin.redelings at gmail dot com ---
It seems like the time and RAM usage for me is:

-g:
   5.3g / ~100s
-g -fno-var-tracking -fno-var-tracking-assignments:
   4.6g / ~80s
no -g:
   2.3g / 43s

So, while it is true that var-tracking is a problem, it is clearly not the
whole problem.  Also for clang we have:

clang -g:
   2.2g / 93s
clang no -g:
   1.2g / 42s   

So clang is not suffering from the RAM hogging problems, at least.

Any suggestions for a path forward on identifying (say) the second-largest
memory hog, after var-tracking?

[Bug tree-optimization/80318] New: GCC takes too much RAM and time compiling a template file

2017-04-04 Thread benjamin.redelings at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80318

Bug ID: 80318
   Summary: GCC takes too much RAM and time compiling a template
file
   Product: gcc
   Version: 7.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: benjamin.redelings at gmail dot com
  Target Milestone: ---

Hi,

When compiling the attached file, GCC takes 2 minutes and about 6 gigs of RAM. 
This is large compared to clang, which takes about 55 second and about 1.8 gigs
of RAM.

Here's the exactly compilation command:

g++-7 -std=c++14 -DHAVE_CONFIG_H -I. -I../../../master/src -I.. 
-I../../../master/include -I../../../master/src  -isystem
../../../master/boost/include -ffast-math -DNDEBUG -DNDEBUG_DP -funroll-loops 
-Wall -Wextra -Wno-sign-compare -Woverloaded-virtual -Wstrict-aliasing -pipe
-O3 -pedantic -I/usr/include/cairo -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng16 -g -Wmisleading-indentation
-Wlogical-op -MT parser/parse.o -MD -MP -MF $depbase.Tpo -c -o parser/parse.o
../../../master/src/parser/parse.C

I've attached the preprocessed source below.

GCC version is.

$ g++-7 -v
Using built-in specs.
COLLECT_GCC=g++-7
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 7-20170316-1'
--with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-7
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie
--with-system-zlib --with-target-system-zlib --enable-objc-gc=auto
--enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 7.0.1 20170316 (experimental) [trunk revision 246203] (Debian
7-20170316-1)

[Bug tree-optimization/80318] GCC takes too much RAM and time compiling a template file

2017-04-05 Thread benjamin.redelings at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80318

--- Comment #2 from benjamin.redelings at gmail dot com ---
Created attachment 41137
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41137&action=edit
preprocessed source