//===- DataStructureAA.cpp - Data Structure Based Alias Analysis ----------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
//
// This pass uses the top-down data structure graphs to implement a simple
// context sensitive alias analysis.
#include "llvm/Analysis/DSGraph.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Module.h"
+using namespace llvm;
namespace {
class DSAA : public Pass, public AliasAnalysis {
DSNode *N1 = I->second.getNode(), *N2 = J->second.getNode();
unsigned O1 = I->second.getOffset(), O2 = J->second.getOffset();
- // We can only make a judgement of one of the nodes is complete...
+ // We can only make a judgment of one of the nodes is complete...
if (N1->isComplete() || N2->isComplete()) {
if (N1 != N2)
return NoAlias; // Completely different nodes.
// The only must alias information we can currently determine occurs when
// the node for P is a global node with only one entry.
- const DSGraph::ScalarMapTy &GSM = G->getScalarMap();
- DSGraph::ScalarMapTy::const_iterator I = GSM.find(P);
- if (I != GSM.end()) {
+ DSGraph::ScalarMapTy::const_iterator I = G->getScalarMap().find(P);
+ if (I != G->getScalarMap().end()) {
DSNode *N = I->second.getNode();
if (N->isComplete() && isSinglePhysicalObject(N))
RetVals.push_back(N->getGlobals()[0]);
#endif
return getAnalysis<AliasAnalysis>().getMustAliases(P, RetVals);
}
+