diff --git a/js/src/nanojit/LIR.cpp b/js/src/nanojit/LIR.cpp index 523eadffca98..e30978ff5f24 100644 --- a/js/src/nanojit/LIR.cpp +++ b/js/src/nanojit/LIR.cpp @@ -1959,7 +1959,6 @@ namespace nanojit CSE_ACC_MULTIPLE( EMB_NUM_USED_ACCS + 1), storesSinceLastLoad(ACCSET_NONE), alloc(alloc), - knownCmpValues(alloc), suspended(false) { @@ -2061,8 +2060,6 @@ namespace nanojit // Note that this clears the CONST and MULTIPLE load tables as well. for (CseAcc a = 0; a < CSE_NUM_USED_ACCS; a++) clearL(a); - - knownCmpValues.clear(); } inline uint32_t CseFilter::hashImmI(int32_t a) { @@ -2466,15 +2463,6 @@ namespace nanojit if (!ins) { ins = out->ins2(op, a, b); addNL(LIns2, ins, k); - } else if (ins->isCmp()) { - if (knownCmpValues.containsKey(ins)) { - // We've seen this comparison before, and it was previously - // used in a guard, so we know what its value must be at this - // point. Replace it with a constant. - NanoAssert(ins->isCmp()); - bool cmpValue = knownCmpValues.get(ins); - return insImmI(cmpValue ? 1 : 0); - } } NanoAssert(ins->isop(op) && ins->oprnd1() == a && ins->oprnd2() == b); return ins; @@ -2589,13 +2577,6 @@ namespace nanojit ins = out->insGuard(op, c, gr); addNL(LIns1, ins, k); } - // After this guard, we know that 'c's result was true (if - // op==LIR_xf) or false (if op==LIR_xt), else we would have - // exited. Record this fact in case 'c' occurs again. - if (!suspended) { - bool c_value = (op == LIR_xt ? false : true); - knownCmpValues.put(c, c_value); - } } else { ins = out->insGuard(op, c, gr); } diff --git a/js/src/nanojit/LIR.h b/js/src/nanojit/LIR.h index 01e6b2ce8d09..fa5924a11ac2 100644 --- a/js/src/nanojit/LIR.h +++ b/js/src/nanojit/LIR.h @@ -1964,12 +1964,6 @@ namespace nanojit Allocator& alloc; - // After a conditional guard such as "xf cmp", we know that 'cmp' must - // be true, else we would have side-exited. So if we see 'cmp' again - // we can treat it like a constant. This table records such - // comparisons. - HashMap knownCmpValues; - // If true, we will not add new instructions to the CSE tables, but we // will continue to CSE instructions that match existing table // entries. Load instructions will still be removed if aliasing