On Tue, Nov 12, 2019 at 02:03:32PM +0100, Jan Hubicka wrote: > this implements use of value ranges in ipa-predicates so inliner know > when some tests are going to be removed (especially NULL pointer > checks). > > Bootstrapped/regtested x86_64-linux. Martin, I would apprechiate if you > look on the patch.
> * gcc.dg/ipa/inline-9.c: New testcase. The testcase is now UNRESOLVED on both x86_64-linux and i686-linux: > --- testsuite/gcc.dg/ipa/inline-9.c (nonexistent) > +++ testsuite/gcc.dg/ipa/inline-9.c (working copy) > @@ -0,0 +1,21 @@ > +/* { dg-options "-Os -fdump-ipa-inline" } */ > +int test(int a) > +{ > + if (a>100) > + { > + foo(); > + foo(); > + foo(); > + foo(); > + foo(); > + foo(); > + foo(); > + foo(); > + } > +} > +main() > +{ > + for (int i=0;i<100;i++) > + test(i); > +} > +/* { dg-final { scan-tree-dump "Inlined 1 calls" "inline" } } */ PASS: gcc.dg/ipa/inline-9.c (test for excess errors) gcc.dg/ipa/inline-9.c: dump file does not exist UNRESOLVED: gcc.dg/ipa/inline-9.c scan-tree-dump inline "Inlined 1 calls" but fixing the obvious bug in there, s/scan-tree-dump/scan-ipa-dump/ doesn't help, nothing is really inlined. Jakub