This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix ipa-inline ICE
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Jan 2018 21:05:31 +0100
- Subject: Re: Fix ipa-inline ICE
- Authentication-results: sourceware.org; auth=none
- References: <20180130131354.GB5559@kam.mff.cuni.cz>
Hi Jan,
> this patch fixed ICE that was introduced by Richard Standiford's change to reorder
> can and want_inline predicates to reduce amount of work done to verify inlining limits.
> This bypasses check that the function is optimized that makes inliner to ICE because
> function summary is missing.
>
> This patch breaks out the expensive limits checking from can predicate to new one
> which makes code bit more convoluted but I hope to clean things up next stage1.
[...]
> * g++.dg/torture/pr81360.C: New testcase
the new testcase comes out UNRESOLVED everywhere:
pr81360.C -O0 scan-ipa-dump icf "Equal symbols: 0"
+UNRESOLVED: g++.dg/torture/pr81360.C -O1 scan-ipa-dump icf "Equal symbols: 0"
+UNRESOLVED: g++.dg/torture/pr81360.C -O2 scan-ipa-dump icf "Equal symbols: 0"
+UNRESOLVED: g++.dg/torture/pr81360.C -O2 -flto scan-ipa-dump icf "Equal symbols: 0"
+UNRESOLVED: g++.dg/torture/pr81360.C -O2 -flto -flto-partition=none scan-ipa-dump icf "Equal symbols: 0"
+UNRESOLVED: g++.dg/torture/pr81360.C -O3 -g scan-ipa-dump icf "Equal symbols: 0"
+UNRESOLVED: g++.dg/torture/pr81360.C -Os scan-ipa-dump icf "Equal symbols: 0"
with
g++.dg/torture/pr81360.C -O0 : dump file does not exist
in the log. The following patch fixes that, tested with the appropriate
runtest invocation.
I guess this is obvious?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* g++.dg/torture/pr81360.C: Add -fdump-ipa-icf to dg-options.
diff --git a/gcc/testsuite/g++.dg/torture/pr81360.C b/gcc/testsuite/g++.dg/torture/pr81360.C
--- a/gcc/testsuite/g++.dg/torture/pr81360.C
+++ b/gcc/testsuite/g++.dg/torture/pr81360.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-early-inlining" } */
+/* { dg-options "-O2 -fno-early-inlining -fdump-ipa-icf" } */
template <int dim> class B;
template <int, int dim> class TriaObjectAccessor;