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]

[tree-ssa] Fix dominator bug


When a block is removed from the flow graph, we need to remove blocks from
the dominance info too.  OK?

Gr.
Steven

	* tree-cfg.c (remove_bb): Remove bb from the dominance info.
Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.246
diff -c -3 -p -r1.1.4.246 tree-cfg.c
*** tree-cfg.c	6 Jan 2004 23:27:49 -0000	1.1.4.246
--- tree-cfg.c	7 Jan 2004 15:06:54 -0000
*************** remove_bb (basic_block bb)
*** 1433,1438 ****
--- 1433,1444 ----
  
    remove_phi_nodes_and_edges_for_unreachable_block (bb);
  
+   /* Remove the block from the dominance info.  */
+   if (dom_computed[CDI_DOMINATORS] != DOM_NONE)
+     delete_from_dominance_info (CDI_DOMINATORS, bb);
+   if (dom_computed[CDI_POST_DOMINATORS] != DOM_NONE)
+     delete_from_dominance_info (CDI_POST_DOMINATORS, bb);
+ 
    /* Remove the basic block from the array.  */
    expunge_block (bb);
  }


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