From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22982 invoked by alias); 24 May 2014 19:58:02 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22391 invoked by uid 48); 24 May 2014 19:57:58 -0000 From: "su at cs dot ucdavis.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/61278] ICE with LTO (lto-wrapper failed) on x86_64-linux-gnu in 64-bit mode Date: Sat, 24 May 2014 19:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: su at cs dot ucdavis.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg02139.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61278 --- Comment #3 from Zhendong Su --- Here is another (somewhat simpler) test case that points to the same issue:= =20 $ gcc-trunk -v Using built-in specs. COLLECT_GCC=3Dgcc-trunk COLLECT_LTO_WRAPPER=3D/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux= -gnu/4.10.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-trunk/configure --prefix=3D/usr/local/gcc-trunk --enable-languages=3Dc,c++ --disable-werror --enable-multilib Thread model: posix gcc version 4.10.0 20140524 (experimental) [trunk revision 210885] (GCC)=20 $=20 $ gcc-trunk -O1 -c small.c small.c: In function =E2=80=98fn2=E2=80=99: small.c:20:1: internal compiler error: Segmentation fault } ^ 0x989def crash_signal ../../gcc-trunk/gcc/toplev.c:337 0x5d4fa0 bitmap_clear ../../gcc-trunk/gcc/bitmap.c:311 0x5d4fa0 bitmap_copy(bitmap_head*, bitmap_head const*) ../../gcc-trunk/gcc/bitmap.c:534 0x961bf7 move_insn_for_shrink_wrap ../../gcc-trunk/gcc/shrink-wrap.c:209 0x961bf7 prepare_shrink_wrap(basic_block_def*) ../../gcc-trunk/gcc/shrink-wrap.c:337 0x961feb try_shrink_wrapping(edge_def**, edge_def*, bitmap_head*, rtx_def*) ../../gcc-trunk/gcc/shrink-wrap.c:463 0x78bbf1 thread_prologue_and_epilogue_insns ../../gcc-trunk/gcc/function.c:5661 0x78bbf1 rest_of_handle_thread_prologue_and_epilogue ../../gcc-trunk/gcc/function.c:6213 0x78bbf1 execute ../../gcc-trunk/gcc/function.c:6252 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. $=20 ------------------------------- int a, b, c, *d, e, f, g, h; int fn1 () { return a - b; } int * fn2 (int *p) { h =3D c; for (e =3D 0; e =3D=3D 0; e =3D fn1 () + 1) for (; f; f++) if (c) g =3D 0; else return d =3D p; return 0; } >>From gcc-bugs-return-452448-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat May 24 21:47:50 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 32310 invoked by alias); 24 May 2014 21:47:49 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 32240 invoked by uid 48); 24 May 2014 21:47:46 -0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/45375] [meta-bug] Issues with building Mozilla with LTO Date: Sat, 24 May 2014 21:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 4.6.0 X-Bugzilla-Keywords: meta-bug X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg02140.txt.bz2 Content-length: 3696 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375 --- Comment #211 from Jan Hubicka --- Elfhack is rather sensitive to LTO, but it works for me, so this seems like binutils issue or some elfhack change that happened recently. I wrote instructions for building firefox with LTO here http://hubicka.blogspot.ca/2014/04/linktime-optimization-in-gcc-2-firefox.html Here I am attaching -ftime-report after the symtab hashtable was removed Execution times (seconds) phase setup : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.02 ( 0%) wall 1536 kB ( 0%) ggc phase opt and generate : 54.29 (58%) usr 1.28 (18%) sys 55.58 (50%) wall 720779 kB (18%) ggc phase stream in : 33.54 (36%) usr 1.84 (26%) sys 35.39 (32%) wall 3389310 kB (82%) ggc phase stream out : 6.00 ( 6%) usr 4.02 (56%) sys 19.99 (18%) wall 0 kB ( 0%) ggc garbage collection : 1.86 ( 2%) usr 0.00 ( 0%) sys 1.86 ( 2%) wall 0 kB ( 0%) ggc callgraph optimization : 0.23 ( 0%) usr 0.00 ( 0%) sys 0.24 ( 0%) wall 9 kB ( 0%) ggc ipa dead code removal : 5.70 ( 6%) usr 0.18 ( 3%) sys 6.15 ( 6%) wall 92 kB ( 0%) ggc ipa inheritance graph : 0.09 ( 0%) usr 0.00 ( 0%) sys 0.09 ( 0%) wall 883 kB ( 0%) ggc ipa virtual call target : 5.58 ( 6%) usr 0.06 ( 1%) sys 5.32 ( 5%) wall 0 kB ( 0%) ggc ipa devirtualization : 0.13 ( 0%) usr 0.00 ( 0%) sys 0.20 ( 0%) wall 9201 kB ( 0%) ggc ipa cp : 2.34 ( 2%) usr 0.21 ( 3%) sys 2.55 ( 2%) wall 223628 kB ( 5%) ggc ipa inlining heuristics : 26.97 (29%) usr 0.67 ( 9%) sys 27.66 (25%) wall 865791 kB (21%) ggc ipa comdats : 0.21 ( 0%) usr 0.00 ( 0%) sys 0.21 ( 0%) wall 0 kB ( 0%) ggc ipa lto gimple in : 0.07 ( 0%) usr 0.11 ( 2%) sys 0.21 ( 0%) wall 0 kB ( 0%) ggc ipa lto gimple out : 0.46 ( 0%) usr 0.19 ( 3%) sys 0.65 ( 1%) wall 0 kB ( 0%) ggc ipa lto decl in : 24.76 (26%) usr 1.28 (18%) sys 26.08 (23%) wall 2571773 kB (63%) ggc ipa lto decl out : 5.45 ( 6%) usr 0.28 ( 4%) sys 5.75 ( 5%) wall 0 kB ( 0%) ggc ipa lto cgraph I/O : 1.13 ( 1%) usr 0.24 ( 3%) sys 1.38 ( 1%) wall 414551 kB (10%) ggc ipa lto decl merge : 2.57 ( 3%) usr 0.01 ( 0%) sys 2.58 ( 2%) wall 8227 kB ( 0%) ggc ipa lto cgraph merge : 1.72 ( 2%) usr 0.00 ( 0%) sys 1.72 ( 2%) wall 12166 kB ( 0%) ggc whopr wpa : 1.04 ( 1%) usr 0.00 ( 0%) sys 1.04 ( 1%) wall 2 kB ( 0%) ggc whopr wpa I/O : 0.03 ( 0%) usr 3.55 (50%) sys 13.51 (12%) wall 0 kB ( 0%) ggc whopr partitioning : 4.97 ( 5%) usr 0.06 ( 1%) sys 5.02 ( 5%) wall 3738 kB ( 0%) ggc ipa reference : 3.62 ( 4%) usr 0.12 ( 2%) sys 3.75 ( 3%) wall 0 kB ( 0%) ggc ipa profile : 0.33 ( 0%) usr 0.01 ( 0%) sys 0.33 ( 0%) wall 0 kB ( 0%) ggc ipa pure const : 3.86 ( 4%) usr 0.01 ( 0%) sys 3.88 ( 3%) wall 0 kB ( 0%) ggc tree eh : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall 0 kB ( 0%) ggc tree CFG cleanup : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall 0 kB ( 0%) ggc varconst : 0.05 ( 0%) usr 0.16 ( 2%) sys 0.13 ( 0%) wall 0 kB ( 0%) ggc unaccounted todo : 0.65 ( 1%) usr 0.00 ( 0%) sys 0.64 ( 1%) wall 0 kB ( 0%) ggc TOTAL : 93.84 7.14 110.98 4111626 kB there are some improvements in devirtualization performance that used quite few decl->symbol lookups. (about 20%)