Author: shihui Date: 2011-05-11 04:38:46 -0400 (Wed, 11 May 2011) New Revision: 3595
Modified: trunk/osprey/be/com/alias_analyzer.cxx trunk/osprey/be/com/alias_analyzer.h trunk/osprey/be/com/wn_mp.cxx Log: Fix bug 769 This assert happens because, in AliasAnalyzer::~AliasAnalyzer, assume lower_mp will always copy parent PU's aliasTagMap to child in Transfer_Maps. This is correct for APO because lower_mp happens after LNO, then alias analyzer is already there. for openmp testcase, lower_mp is invoked before LNO and preopt in Backend_Processing, so the child PU doesn't have aliasTagmap copied from parent PU. previous fix for APO is not good, it copies extra map and delete directly. Now the fix is always not copy alias tag map when lower_mp create parallel PU. 1. In lower_mp, Create_MicroTask, mark don't copy alias tag map if aliasanalyzer exist. 2. In AliasAnalyzer::~AliasAnalyzer, remove code for deleteing child PU's aliastagmap. Code review by Jianxin Modified: trunk/osprey/be/com/alias_analyzer.cxx =================================================================== --- trunk/osprey/be/com/alias_analyzer.cxx 2011-05-11 08:02:17 UTC (rev 3594) +++ trunk/osprey/be/com/alias_analyzer.cxx 2011-05-11 08:38:46 UTC (rev 3595) @@ -97,17 +97,6 @@ MEM_POOL_Delete(&_memPool); IPA_WN_MAP_Delete(Current_Map_Tab, _aliasTagMap); - // delete the mp generate pu's map - PU_Info *child = PU_Info_child(Current_PU_Info); - while (child) { - if (PU_mp(PU_Info_pu(child))) { - FmtAssert(PU_Info_maptab(child)->_pool[_aliasTagMap] == - PU_Info_maptab(Current_PU_Info)->_pool[_aliasTagMap] , - ("the child mp pu pool is not equal to _memPool")); - IPA_WN_MAP_Delete(PU_Info_maptab(child), _aliasTagMap); - } - child = PU_Info_next(child); - } } ALIAS_RESULT Modified: trunk/osprey/be/com/alias_analyzer.h =================================================================== --- trunk/osprey/be/com/alias_analyzer.h 2011-05-11 08:02:17 UTC (rev 3594) +++ trunk/osprey/be/com/alias_analyzer.h 2011-05-11 08:38:46 UTC (rev 3595) @@ -150,6 +150,8 @@ bool checkQueryFile(UINT32 pu, AliasTag tag1, AliasTag tag2, bool &result); + WN_MAP aliasTagMap() { return _aliasTagMap; } + private: void loadQueryFile(char *filename); Modified: trunk/osprey/be/com/wn_mp.cxx =================================================================== --- trunk/osprey/be/com/wn_mp.cxx 2011-05-11 08:02:17 UTC (rev 3594) +++ trunk/osprey/be/com/wn_mp.cxx 2011-05-11 08:38:46 UTC (rev 3595) @@ -140,6 +140,7 @@ #include "wn_lower.h" #include "config_opt.h" #endif +#include "alias_analyzer.h" /* MP lowerer cleanup TODO by DRK: @@ -2758,6 +2759,16 @@ Set_PU_Info_state(parallel_pu, WT_PROC_SYM, Subsect_InMem); Set_PU_Info_flags(parallel_pu, PU_IS_COMPILER_GENERATED); + // don't copy nystrom points to analysis, alias_tag map + // mp function's points to analysis will be analyzed locally. + AliasAnalyzer *aa = AliasAnalyzer::aliasAnalyzer(); + if (aa) { + // Current_Map_Tab is update to PU_Info_maptab(parallel_pu) in PU_Info_maptab + Is_True(PU_Info_maptab(parallel_pu) == Current_Map_Tab, + ("parallel_pu's PU's maptab isn't parallel_pu\n")); + WN_MAP_Set_dont_copy(aa->aliasTagMap(), FALSE); + } + // use hack to save csymtab using parallel_pu, so we can restore it // later when we lower parallel_pu; this is necessary because the // new symtab routines can't maintain more than one chain of symtabs ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel