Author: shihui Date: 2011-04-13 05:59:03 -0400 (Wed, 13 Apr 2011) New Revision: 3549
Modified: trunk/osprey/ipa/main/analyze/ipa_nystrom_alias_analyzer.cxx Log: Fix bug748: ConstraintGraph::buildCGipa construct each PU's local constraint graph and merge global constraint graph node into ConstraintGraph ::GlobalCG. There maybe complicated cases when different PU's IPL constraint graph has inconsistent parent relationship between nodes. This bug is collapsed node in one PU is parent of its collapsed parent in another PU. Current implementation doesn't consider if a node is collpased when break such parent cycle. Detail in bug description. Fix is breaking the parent cycle in another way when find cgNode has collapsed flag. Put the collapsed node at bottom of repParent chain, merge its edges and points_to to its parent. This makes collapsed node align with its definition. Code Review: Jian-Xin Modified: trunk/osprey/ipa/main/analyze/ipa_nystrom_alias_analyzer.cxx =================================================================== --- trunk/osprey/ipa/main/analyze/ipa_nystrom_alias_analyzer.cxx 2011-04-13 02:19:09 UTC (rev 3548) +++ trunk/osprey/ipa/main/analyze/ipa_nystrom_alias_analyzer.cxx 2011-04-13 09:59:03 UTC (rev 3549) @@ -370,8 +370,27 @@ repPNodeParent->merge(cgNode); cgNode->repParent(repPNodeParent); } + else if (repPNode != cgNode && cgNode->checkFlags(CG_NODE_FLAGS_COLLAPSED)) { + // summNode parent is not cgNode, and cgNode is summNode parent's + // parent. Here is a cyclic repParent chain. + // if cgNode is collapsed node(means it will not used in points to), + // break the chain and make cgNode not top repParent. + repPNodeParent = repPNode; + while (true) { + if (repPNodeParent->repParent() == cgNode) { + repPNodeParent->repParent(NULL); + break; + } + repPNodeParent = repPNodeParent->repParent(); + } + repPNodeParent->clearFlags(CG_NODE_FLAGS_MERGED); + repPNodeParent->merge(cgNode); + cgNode->repParent(repPNode); + } + else { + // here it is break the chain, and let cgNode be top repParent. + } } - // Set the collapsed parent if (cgNode->checkFlags(CG_NODE_FLAGS_COLLAPSED)) { if (summNode.collapsedParent() != 0) { ------------------------------------------------------------------------------ Forrester Wave Report - Recovery time is now measured in hours and minutes not days. Key insights are discussed in the 2010 Forrester Wave Report as part of an in-depth evaluation of disaster recovery service providers. Forrester found the best-in-class provider in terms of services and vision. Read this report now! http://p.sf.net/sfu/ibm-webcastpromo _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel