Author: shihui
Date: 2011-05-25 10:53:17 -0400 (Wed, 25 May 2011)
New Revision: 3628
Modified:
trunk/osprey/be/com/nystrom_alias_analyzer.cxx
Log:
Fix nystrom alias create alias tag issue.
When creating alias tag, alias_tag points to blackhole need also points to all
globals and local escape nodes.
Code review by Sun Chan
Modified: trunk/osprey/be/com/nystrom_alias_analyzer.cxx
===================================================================
--- trunk/osprey/be/com/nystrom_alias_analyzer.cxx 2011-05-25 07:23:58 UTC
(rev 3627)
+++ trunk/osprey/be/com/nystrom_alias_analyzer.cxx 2011-05-25 14:53:17 UTC
(rev 3628)
@@ -465,6 +465,23 @@
void
NystromAliasAnalyzer::createAliasTags(WN *entryWN)
{
+ // if one node points to a black hole cg node.
+ // it should also points to globals and escaple locals.
+ PointsTo bh_points_to;
+ if (!_isPostIPA) {
+ for (CGNodeToIdMapIterator iter = _constraintGraph->lBegin();
+ iter != _constraintGraph->lEnd();
+ iter++) {
+ ConstraintGraphNode *node = iter->first;
+ StInfo *stinfo = node->stInfo();
+ // in ipa mode, not a pointer doesn't have stinfo.
+ // check ConstraintGraph::buildCGFromSummary
+ if (stinfo && stinfo->checkFlags(CG_ST_FLAGS_GLOBAL |
CG_ST_FLAGS_ESCLOCAL)) {
+ bh_points_to.setBit(node->id());
+ }
+ }
+ }
+
for (WN_ITER *wni = WN_WALK_TreeIter(entryWN);
wni; wni = WN_WALK_TreeNext(wni))
{
@@ -511,8 +528,12 @@
AliasTagInfo *aliasTagInfo = _aliasTagInfo[aliasTag];
// Union all the points-to sets
- if (!_isPostIPA)
+ if (!_isPostIPA) {
cgNode->findRep()->postProcessPointsTo(aliasTagInfo->pointsTo());
+ if (aliasTagInfo->pointsTo().isSet(ConstraintGraph::blackHoleId())) {
+ aliasTagInfo->pointsTo().setUnion(bh_points_to);
+ }
+ }
else {
aliasTagInfo->pointsTo().setUnion(cgNode->pointsTo(CQ_GBL));
aliasTagInfo->pointsTo().setUnion(cgNode->pointsTo(CQ_DN));
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel