Fix ipa-inline ICE

Jakub Jelinek jakub@redhat.com
Tue Jan 30 22:53:00 GMT 2018


On Tue, Jan 30, 2018 at 09:05:31PM +0100, Rainer Orth wrote:
> > 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?

Yes, but I wonder why the test is in g++.dg/torture/, that makes
no sense for a test with -O2 in dg-options which overrides all the
optimization options it cycles through.  Move it into g++.dg/ipa/ instead?

	Jakub



More information about the Gcc-patches mailing list