Author: laijx
Date: 2011-02-27 08:18:36 -0500 (Sun, 27 Feb 2011)
New Revision: 3495
Modified:
trunk/osprey/be/com/wn_cfg_template.h
Log:
Fix two bugs in WHIRL CFG:
1. Fix the assertion about the ALTENTRY. The BB contains ALTENTRY should
have one predecessor, the dummy entry.
2. Fix the segmentation fault when the next WN of TRUEBR/FALSEBR is NULL
CR by Sun.
Modified: trunk/osprey/be/com/wn_cfg_template.h
===================================================================
--- trunk/osprey/be/com/wn_cfg_template.h 2011-02-26 18:32:09 UTC (rev
3494)
+++ trunk/osprey/be/com/wn_cfg_template.h 2011-02-27 13:18:36 UTC (rev
3495)
@@ -748,7 +748,6 @@
Is_True(wn != NULL && WN_operator(wn) == OPR_ALTENTRY,
("WN is not ALTENTRY"));
Is_True(_current_bb != NULL, ("Current BB is NULL"));
- Is_True(_current_bb->Get_preds_count() == 0, ("Current BB has
predecessors"));
_current_bb = _action.Create_node(NULL, wn);
_action.Process_entry_node(_current_bb);
@@ -1093,8 +1092,10 @@
}
// create and connect BB1
- _current_bb = _action.Create_node(condgoto_bb, WN_next(wn));
- _action.Process_predsucc(condgoto_bb, _current_bb);
+ if (WN_next(wn) != NULL) {
+ _current_bb = _action.Create_node(condgoto_bb, WN_next(wn));
+ _action.Process_predsucc(condgoto_bb, _current_bb);
+ }
}
//===================================================================
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel