Hi, Can a gate keeper to review the patch to WHIRL SSA in MainOPT emitter. Thank you very much. The problem is found in testing a openmp case. When a PU is created from the parallel region of openmp, the WHIRL SSA manager is NULL. In this case, we need to create a new WHIRL_SSA_MANAGER instance.
Index: osprey/be/opt/opt_htable_emit.cxx =================================================================== --- osprey/be/opt/opt_htable_emit.cxx (revision 3487) +++ osprey/be/opt/opt_htable_emit.cxx (working copy) @@ -415,7 +415,16 @@ // WHIRL SSA if (OPT_Enable_WHIRL_SSA) { - WSSA::WHIRL_SSA_MANAGER *wssa_mgr = PU_Info_ssa_ptr(Current_PU_Info); + WSSA::WHIRL_SSA_MANAGER *wssa_mgr = NULL; + if (PU_Info_state(Current_PU_Info, WT_SSA) == Subsect_InMem) { + wssa_mgr = PU_Info_ssa_ptr(Current_PU_Info); + } + else { + wssa_mgr = new WSSA::WHIRL_SSA_MANAGER(MEM_pu_nz_pool_ptr); + Set_PU_Info_ssa_ptr(Current_PU_Info, wssa_mgr); + Set_PU_Info_state(Current_PU_Info, WT_SSA, Subsect_InMem); + } + _wssa_emitter = CXX_NEW(WHIRL_SSA_EMITTER(wssa_mgr, _opt_stab, _wn_to_cr_map), _mem_pool); // dump code rep and SSA tree before emitter. -- Regards, Lai Jian-Xin
------------------------------------------------------------------------------ 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 Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel