This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Updates merged bb count
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: Dehao Chen <dehao at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Sat, 31 May 2014 01:50:36 +0200
- Subject: Re: [PATCH] Updates merged bb count
- Authentication-results: sourceware.org; auth=none
- References: <CAO2gOZXPsoRetjgWtATwAqj0FGAbH59S_+-bQAm1Lstx6WHSZA at mail dot gmail dot com>
On Fri, May 30, 2014 at 11:43 PM, Dehao Chen wrote:
> Index: gcc/testsuite/gcc.dg/tree-prof/merge_block.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/tree-prof/merge_block.c (revision 0)
> +++ gcc/testsuite/gcc.dg/tree-prof/merge_block.c (revision 0)
> @@ -0,0 +1,20 @@
> +
> +/* { dg-options "-O2 -fno-ipa-pure-const
> -fdump-tree-optimized-blocks-details -fno-early-inlining" } */
> +int a[8];
> +int t()
> +{
> + int i;
> + for (i = 0; i < 3; i++)
> + if (a[i])
> + break;
> + return i;
> +}
> +main ()
> +{
> + int i;
> + for (i = 0; i < 1000; i++)
> + t ();
> + return 0;
> +}
> +/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
> +/* { dg-final-use { cleanup-tree-dump "optimized" } } */
I suppose you want to avoid having t() inlined into main()? If so,
then I'd suggest adding __attribute__((__noinline__,__noclone__)) to
"robustify" the test case.
Ciao!
Steven