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]

[PATCH 5/8] Drop an incorrect assert


From: Dmitry Melnik <dm@ispras.ru>

This fixes a bug caused by trying to initialize BB_AV_SET of a newly generated
jump.  It assumes that jump is only generated in new bb, while it can be
replaced in same BB by try_redirect_by_replacing_jump, if jump was conditional
and was pointing to the same BB by its both edges (this may happen due to
predication, when moving all insns up from a "diamond").

2011-08-04  Dmitry Melnik  <dm@ispras.ru>

	* sel-sched-ir.c (invalidate_av_set): Remove the assert.

diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index f22e637..dd8b3da 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -4284,14 +4284,13 @@ free_lv_sets (void)
       free_lv_set (bb);
 }
 
-/* Initialize an invalid AV_SET for BB.
-   This set will be updated next time compute_av () process BB.  */
+/* Mark AV_SET for BB as invalid, so this set will be updated the next time
+   compute_av() processes BB.  This function is called when creating new basic
+   blocks, as well as for blocks (either new or existing) where new jumps are
+   created when the control flow is being updated.  */
 static void
 invalidate_av_set (basic_block bb)
 {
-  gcc_assert (BB_AV_LEVEL (bb) <= 0
-	      && BB_AV_SET (bb) == NULL);
-
   BB_AV_LEVEL (bb) = -1;
 }
 


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