Author: meiye
Date: 2011-05-23 18:52:35 -0400 (Mon, 23 May 2011)
New Revision: 3618
Modified:
trunk/osprey/be/opt/opt_cfg.cxx
Log:
in 'CFG::Remove_bb', When an EH region end block is removed, we did not
provide a new region end. This fix identifies whether the BB to be deleted is
an EH region end. If so, we use its previous node as the new region end. CR:
Min Zhao
Modified: trunk/osprey/be/opt/opt_cfg.cxx
===================================================================
--- trunk/osprey/be/opt/opt_cfg.cxx 2011-05-23 22:15:28 UTC (rev 3617)
+++ trunk/osprey/be/opt/opt_cfg.cxx 2011-05-23 22:52:35 UTC (rev 3618)
@@ -226,6 +226,32 @@
pred->Remove_succ( bb, Mem_pool() );
}
+ if (bb->EH_region() && bb->Rid()) {
+ // If bb is in a EH region, walk up Prev() link to find the region start.
+ // If bb is the region end, make its Prev() node to be the new
+ // region end.
+ INT id = RID_id(bb->Rid());
+ STACK<INT> * stk = CXX_NEW(STACK<INT> (Mem_pool()), Mem_pool());
+ stk->Push(id);
+ BB_NODE * bb_iter = bb;
+ while (bb_iter && bb_iter->Rid() && !stk->Is_Empty()) {
+ INT iter_id = RID_id(bb_iter->Rid());
+ if (stk->Top() != iter_id) {
+ stk->Push(iter_id);
+ }
+ else if (bb_iter->Kind() == BB_REGIONSTART) {
+ BB_REGION * region = bb_iter->Regioninfo();
+ if (region && (region->Region_end() == bb)) {
+ BB_NODE * bb_prev = bb->Prev();
+ region->Set_region_end(bb_prev);
+ }
+ stk->Pop();
+ }
+ bb_iter = bb_iter->Prev();
+ }
+ CXX_DELETE(stk, Mem_pool());
+ }
+
if (bb->Is_first())
_first_bb = bb->Next();
if (bb->Is_last())
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel