minor cleanups
authorChris Lattner <sabre@nondot.org>
Tue, 27 Jan 2004 21:51:19 +0000 (21:51 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 27 Jan 2004 21:51:19 +0000 (21:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10985 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/DataStructureAA.cpp
lib/Analysis/DataStructure/Local.cpp

index cbc13cec25f201e0014ef08bf4f20e96d5383c99..8a2e0caa425c274850c19294d9369c5180651a8d 100644 (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 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]);
index 5cafefaff44e5fbf7a6bdbd5e049a5f1f38a4684..03ec74102688d883340d3d904dcfacbfb7abf22d 100644 (file)
@@ -172,10 +172,9 @@ DSGraph::DSGraph(const TargetData &td, Function &F, DSGraph *GG)
 
   // Remove all integral constants from the scalarmap!
   for (ScalarMapTy::iterator I = ScalarMap.begin(); I != ScalarMap.end();)
-    if (isa<ConstantIntegral>(I->first)) {
-      ScalarMapTy::iterator J = I++;
-      ScalarMap.erase(J);
-    } else
+    if (isa<ConstantIntegral>(I->first))
+      ScalarMap.erase(I++);
+    else
       ++I;
 
   markIncompleteNodes(DSGraph::MarkFormalArgs);