Author: yug Date: 2012-01-30 03:53:26 -0500 (Mon, 30 Jan 2012) New Revision: 3863
Modified: trunk/osprey/be/opt/opt_verify.cxx Log: fix for bug889/bug891. Allow the corner case of return_vsym unreferenced due to return stmt in Exit_BB unreachable. Code Review: Sun Chan. Modified: trunk/osprey/be/opt/opt_verify.cxx =================================================================== --- trunk/osprey/be/opt/opt_verify.cxx 2012-01-26 19:12:56 UTC (rev 3862) +++ trunk/osprey/be/opt/opt_verify.cxx 2012-01-30 08:53:26 UTC (rev 3863) @@ -915,6 +915,19 @@ return; } + // open64.net bug889. The Chi/Phis to return_vsym are marked live only + // when the return stmt in the exit BB is marked live and + // then propagated back to references in other BBs. However, in the case of + // return stmt is deleted by DCE or (unreachable from the first BB), + // remaining stmts with Chi to return_vsym will get a reference error + // we allow this corner case since we don't want change the main DCE algorithm + // and allow this still do right compiling. + + if (cr->Aux_id() == opt_stab->Return_vsym() && + !(opt_stab->Cfg()->Exit_bb()->Reached() || + opt_stab->Cfg()->Fake_exit_bb()->Reached())) + return; + FmtAssert(FALSE, ("sym%dv%d(cr%d) live range overlapped with cur_version sym%dv%d(cr%d) in bb%d line %d", cr->Aux_id(), cr->Version(), cr->Coderep_id(), cur_ver->Aux_id(), cur_ver->Version(), cur_ver->Coderep_id(), ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel