harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r600836 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer: globalcodemotion.cpp globalcodemotion.h
Date Tue, 04 Dec 2007 08:38:19 GMT
Author: varlax
Date: Tue Dec  4 00:38:18 2007
New Revision: 600836

URL: http://svn.apache.org/viewvc?rev=600836&view=rev
Log:
Applied HARMONY-3649 [drlvm][jit] SPECjbb2005 intermittently fails on EM64T in server mode

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/globalcodemotion.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/globalcodemotion.h

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/globalcodemotion.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/globalcodemotion.cpp?rev=600836&r1=600835&r2=600836&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/globalcodemotion.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/globalcodemotion.cpp Tue Dec  4
00:38:18 2007
@@ -260,7 +260,14 @@
                     Log::out() << " is used by "; i->print(Log::out());
                     Log::out() << std::endl;
                 }
-                uses[srcInst].insert(i);
+                UsesMap::iterator it = uses.find(srcInst);
+                UsesSet* theSet = NULL; 
+                if (it == uses.end()) {
+                    theSet = new (mm) UsesSet(mm);
+                    it = uses.insert(::std::make_pair(srcInst, theSet)).first;
+                }
+                theSet = it->second;
+                theSet->insert(i);
             }
         }
 
@@ -312,7 +319,15 @@
                 Log::out() << ", which has early placement in "; FlowGraph::printLabel(Log::out(),
srcInstEarliest);
                 Log::out() << std::endl;
             }
-            uses[srcInst].insert(i); // record the use while we're iterating.
+            // record the use while we're iterating.
+            UsesMap::iterator it = uses.find(srcInst);
+            UsesSet* theSet = NULL; 
+            if (it == uses.end()) {
+                theSet = new (mm) UsesSet(mm);
+                it = uses.insert(::std::make_pair(srcInst, theSet)).first;
+            }
+            theSet = it->second;
+            theSet->insert(i);
         }
         srcInstEarliest = currentEarliest;  // now is the latest placement of src insts
         // moving above catch inst may cause problems in code emitter
@@ -438,9 +453,17 @@
 
     // schedule users
     DominatorNode *lca = 0;
-    UsesSet &users = uses[i];
-    UsesSet::iterator uiter = users.begin();
-    UsesSet::iterator uend = users.end();
+    UsesMap::iterator it = uses.find(i);
+    UsesSet* users = NULL;
+
+    if (it == uses.end()) {
+        users = new (mm) UsesSet(mm);
+        it = uses.insert(::std::make_pair(i, users)).first;
+    }
+
+    users = it->second;
+    UsesSet::iterator uiter = users->begin();
+    UsesSet::iterator uend = users->end();
 
     for ( ; uiter != uend; ++uiter) {
         Inst *useri = *uiter;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/globalcodemotion.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/globalcodemotion.h?rev=600836&r1=600835&r2=600836&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/globalcodemotion.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/globalcodemotion.h Tue Dec  4 00:38:18
2007
@@ -86,8 +86,8 @@
     StlHashMap<Inst*, DominatorNode *> latest;
     typedef StlHashSet<Inst *> VisitedSet;
     VisitedSet visited;
-    typedef ::std::set<Inst *> UsesSet;
-    typedef StlHashMap<Inst *, UsesSet> UsesMap;
+    typedef StlHashSet<Inst *> UsesSet;
+    typedef StlHashMap<Inst *, UsesSet*> UsesMap;
     UsesMap uses;
 
     void scheduleAllEarly();



Mime
View raw message