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 174729 0f3f132e2198013d221b0f914b7b6d67aae30a35
parent 174728 c4a963c41576aa3c6b572da6f2ce447c69172ddf
child 174730 c63eaabaefb176376dc71a598eb7a1d47a08772b
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [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;