Bug 945939 - Use the pre-split value when numbering values; r=sunfish
authorTerrence Cole <terrence@mozilla.com>
Wed, 04 Dec 2013 09:00:23 -0800
changeset 173755 0f3f132e2198013d221b0f914b7b6d67aae30a35
parent 173754 c4a963c41576aa3c6b572da6f2ce447c69172ddf
child 173756 c63eaabaefb176376dc71a598eb7a1d47a08772b
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssunfish
bugs945939
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 945939 - Use the pre-split value when numbering values; r=sunfish
js/src/jit/ValueNumbering.cpp
--- a/js/src/jit/ValueNumbering.cpp
+++ b/js/src/jit/ValueNumbering.cpp
@@ -25,29 +25,28 @@ TempAllocator &
 ValueNumberer::alloc() const
 {
     return graph_.alloc();
 }
 
 uint32_t
 ValueNumberer::lookupValue(MDefinition *ins)
 {
-
     ValueMap::AddPtr p = values.lookupForAdd(ins);
-
     if (p) {
         // make sure this is in the correct group
         setClass(ins, p->key());
-    } else {
-        if (!values.add(p, ins, ins->id()))
-            return 0;
-        breakClass(ins);
+        return p->value();
     }
 
-    return p->value();
+    if (!values.add(p, ins, ins->id()))
+        return 0;
+    breakClass(ins);
+
+    return ins->id();
 }
 
 MDefinition *
 ValueNumberer::simplify(MDefinition *def, bool useValueNumbers)
 {
     if (def->isEffectful())
         return def;