This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Enable -fuse-linker-plugin by default when possible, take 2
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, gcc-patches at gcc dot gnu dot org, bonzini at gnu dot org, aoliva at redhat dot com, rguenther at suse dot de
- Date: Wed, 1 Dec 2010 21:10:26 +0100
- Subject: Re: Enable -fuse-linker-plugin by default when possible, take 2
- References: <20101128215916.GA8909@kam.mff.cuni.cz> <AANLkTinnsPtf=roRUDTL5r_7y-vMp9xghg1KbpDjhs2X@mail.gmail.com> <20101129152307.GC8909@kam.mff.cuni.cz> <20101129170144.GD8909@kam.mff.cuni.cz>
> Hi,
> here is updated patch with the test -f ../lto-plugin/Makefile trick and extra
> dependency on cc1plugin.
> There are still the failures:
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-alloca-1.C -O2 -flto -flto-partition=none (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-alloca-1.C -O2 -flto (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-global-1.C -O2 -flto -flto-partition=none (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-global-1.C -O2 -flto (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-inline-1.C -O2 -flto -flto-partition=none (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-inline-1.C -O2 -flto (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-inline-2.C -O2 -flto -flto-partition=none (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-inline-2.C -O2 -flto (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-vararg-1.C -O2 -flto -flto-partition=none (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-vararg-1.C -O2 -flto (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-vararg-2.C -O2 -flto -flto-partition=none (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-vararg-2.C -O2 -flto (test for excess errors)
> ./gcc/testsuite/gcc5/gcc.sum:FAIL: gcc.c-torture/execute/builtins/memops-asm.c execution, -O2 -flto
> ./gcc/testsuite/gcc5/gcc.sum:FAIL: gcc.c-torture/execute/builtins/snprintf-chk.c execution, -O2 -flto
> ./gcc/testsuite/gcc5/gcc.sum:FAIL: gcc.c-torture/execute/builtins/sprintf-chk.c execution, -O2 -flto
> ./gcc/testsuite/gcc5/gcc.sum:FAIL: gcc.c-torture/execute/builtins/strncpy-chk.c execution, -O2 -flto
> ./gcc/testsuite/gcc5/gcc.sum:FAIL: gcc.c-torture/execute/builtins/vsnprintf-chk.c execution, -O2 -flto
> ./gcc/testsuite/gcc2/gcc.sum:FAIL: gcc.c-torture/execute/bcp-1.c execution, -O2 -flto
> ./gcc/testsuite/gcc2/gcc.sum:FAIL: gcc.c-torture/execute/eeprof-1.c execution, -O2 -flto
Hi,
with today fixes, I am down to
./gcc/testsuite/gcc/gcc.sum:FAIL: gcc.c-torture/execute/builtins/memops-asm.c execution, -O2 -flto
./gcc/testsuite/gcc/gcc.sum:FAIL: gcc.dg/guality/pr41353-1.c -O2 -flto line 17 vari == 17
memops-asm is due to fact that we have no way to relate my_memcpy with memcpy
asm("my_memcpy") at the moment. We will need the extra target hook, updates to
lto-symtab and even with that we might still need to fight one-decl rule
problem related to builtins.
gcc.dg/guality/pr41353-1.c is because int vari = 17; is brought static and
consequently optimized away because it is unused. We are known to be broken
here.
Would be the patch enabling linker plugin OK with those two testcases marked as XFAIL?
(and is there way to mark testcase XFAIL for LTO only?).
As discussed earlier, linker plugin is by no means perfect, but the set of
programs we can compile with it is greater than set of programs we can compile
with collect2 logic alone, so the change should be an improvement.
Honza