This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve discriminator assignment in for loops


>> ? ? ? ?* cfghooks.c (split_block): Copy discriminator to new block.
>> ? ? ? ?* tree-cfg.c (assign_discriminator): Check location of last
>> ? ? ? ?instruction in block as well as first.
>
> Ok.

Crud -- I missed a warning that breaks the bootstrap. (Sorry, Andrew!)

Here's a patch that I'll check in as obvious as soon as I actually do
the bootstrap.

-cary


        * tree-cfg.c (assign_discriminator): Add explicit parens.


Index: tree-cfg.c
===================================================================
--- tree-cfg.c	(revision 150065)
+++ tree-cfg.c	(working copy)
@@ -763,8 +763,8 @@ assign_discriminator (location_t locus,

   first_in_to_bb = first_non_label_stmt (bb);
   last_in_to_bb = last_stmt (bb);
-  if (first_in_to_bb && same_line_p (locus, gimple_location (first_in_to_bb))
-      || last_in_to_bb && same_line_p (locus, gimple_location (last_in_to_bb)))
+  if ((first_in_to_bb && same_line_p (locus, gimple_location (first_in_to_bb)))
+      || (last_in_to_bb && same_line_p (locus, gimple_location
(last_in_to_bb))))
     bb->discriminator = next_discriminator_for_locus (locus);
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]