minor cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10985 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-01-27 21:51:19 +00:00
parent 825a02ae36
commit 02da032b03
2 changed files with 5 additions and 7 deletions

View File

@ -166,9 +166,8 @@ void DSAA::getMustAliases(Value *P, std::vector<Value*> &RetVals) {
// The only must alias information we can currently determine occurs when // The only must alias information we can currently determine occurs when
// the node for P is a global node with only one entry. // the node for P is a global node with only one entry.
const DSGraph::ScalarMapTy &GSM = G->getScalarMap(); DSGraph::ScalarMapTy::const_iterator I = G->getScalarMap().find(P);
DSGraph::ScalarMapTy::const_iterator I = GSM.find(P); if (I != G->getScalarMap().end()) {
if (I != GSM.end()) {
DSNode *N = I->second.getNode(); DSNode *N = I->second.getNode();
if (N->isComplete() && isSinglePhysicalObject(N)) if (N->isComplete() && isSinglePhysicalObject(N))
RetVals.push_back(N->getGlobals()[0]); RetVals.push_back(N->getGlobals()[0]);

View File

@ -172,10 +172,9 @@ DSGraph::DSGraph(const TargetData &td, Function &F, DSGraph *GG)
// Remove all integral constants from the scalarmap! // Remove all integral constants from the scalarmap!
for (ScalarMapTy::iterator I = ScalarMap.begin(); I != ScalarMap.end();) for (ScalarMapTy::iterator I = ScalarMap.begin(); I != ScalarMap.end();)
if (isa<ConstantIntegral>(I->first)) { if (isa<ConstantIntegral>(I->first))
ScalarMapTy::iterator J = I++; ScalarMap.erase(I++);
ScalarMap.erase(J); else
} else
++I; ++I;
markIncompleteNodes(DSGraph::MarkFormalArgs); markIncompleteNodes(DSGraph::MarkFormalArgs);