This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Modulo-scheduling improvements. Print the SCCs and add check.
- From: Ayal Zaks <ZAKS at il dot ibm dot com>
- To: Revital1 Eres <ERES at il dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 2 Jul 2007 20:39:15 +0300
- Subject: Re: [PATCH] Modulo-scheduling improvements. Print the SCCs and add check.
Revital1 Eres/Haifa/IBM wrote on 02/07/2007 17:03:36:
> This patch adds a sanity-check for the sccs (testcase 20050330-1.c fails
> with this check if we do not fix the initialization of scc_nodes sbitmap
> http://gcc.gnu.org/ml/gcc-patches/2007-06/msg01984.html); and also prints
> them to the dump file.
> It was bootstrapped and tested on ppc64 and x86_64 with -fmodulo-sched.
> OK for mainline?
Yes, with the following comments, the last of which requires re-testing.
+/* Check the SCCS. */
Not a very useful comment. Better explain what is checked - that every
element of NUM_NODES belongs to exactly one element of SCCS, and that no
element of SCCS is empty
+check_sccs (ddg_all_sccs_ptr sccs, int num_nodes)
+ int i = 0;
+ sbitmap tmp = sbitmap_alloc (num_nodes);
+ sbitmap_zero (tmp);
+ for (i = 0; i < sccs->num_sccs; i++)
+ /* Verify that every node in sccs is in exactly one strongly
+ connected component. */
+ gcc_assert (!sbitmap_empty_p (sccs->sccs[i]->nodes)
+ && !sbitmap_any_common_bits (tmp,
Better split this into two separate gcc_assert's.
+ sbitmap_a_or_b (tmp, tmp, sccs->sccs[i]->nodes);
Should also check that all bits in tmp are now set, i.e. every node belongs
to some scc. This addition requires retesting.
+ sbitmap_free (tmp);
> :ADDPATCH modulo-sched:
> 2007-07-02 Revital Eres <firstname.lastname@example.org>
> * ddg.c (print_sccs): New function.
> (check_sccs): New function.
> (create_ddg_all_sccs): Use it.
> * ddg.h (print_sccs): Declare.
> * modulo-sched.c (sms_order_nodes): Call print_sccs.
> [attachment "patch_sccs_sms_7_2.txt" deleted by Ayal Zaks/Haifa/IBM]