This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Use known value ranges while evaluating ipa predicates
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, mjambor at suse dot cz, rguenther at suse dot de
- Date: Fri, 15 Nov 2019 00:46:05 +0100
- Subject: Re: Use known value ranges while evaluating ipa predicates
- References: <20191112130332.b5dyohbxz7s4k4op@kam.mff.cuni.cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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