Author: yug Date: 2011-10-10 06:46:29 -0400 (Mon, 10 Oct 2011) New Revision: 3756
Modified: trunk/osprey/be/opt/opt_cfg.cxx Log: Fix bug869, single succ bb for TRUEBR. Code Review: Lai Jianxin Modified: trunk/osprey/be/opt/opt_cfg.cxx =================================================================== --- trunk/osprey/be/opt/opt_cfg.cxx 2011-10-10 06:57:05 UTC (rev 3755) +++ trunk/osprey/be/opt/opt_cfg.cxx 2011-10-10 10:46:29 UTC (rev 3756) @@ -3189,6 +3189,19 @@ ("Non-empty block assigned to a label") ); // if we're trying to add this label to a non-empty block, we // need to end the current block, and connect the new one to it + + // fix bug869(open64.net), check to see whether last statement of _current_bb + // is OPR_FALSEBR/OPR_TRUEBR, and the statment's label bb is label_bb. + // if so, add the null fall-through bb and set it be the current bb + WN* last_wn=_current_bb->Laststmt(); + if (last_wn && + (OPCODE_operator(WN_opcode(last_wn)) == OPR_FALSEBR || + OPCODE_operator(WN_opcode(last_wn)) == OPR_TRUEBR) && + Get_bb_from_label( WN_label_number(last_wn)) == label_bb) { + BB_NODE* fall_through_bb= Create_bb(); + Connect_predsucc(_current_bb,fall_through_bb); + Append_bb(fall_through_bb); + } if ( ! _current_bb->Hasujp() ) Connect_predsucc( _current_bb, label_bb ); Append_bb( label_bb ); ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel