Skip to content

Commit

Permalink
Backed out changeset 2e21c25656ee due to tinderbox oranges.
Browse files Browse the repository at this point in the history
--HG--
extra : convert_revision : ce381ce50f62501ae385870d1328df73e68d7a27
  • Loading branch information
nnethercote committed Sep 29, 2010
1 parent f914345 commit 4119caf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
19 changes: 0 additions & 19 deletions js/src/nanojit/LIR.cpp
Expand Up @@ -1959,7 +1959,6 @@ namespace nanojit
CSE_ACC_MULTIPLE( EMB_NUM_USED_ACCS + 1),
storesSinceLastLoad(ACCSET_NONE),
alloc(alloc),
knownCmpValues(alloc),
suspended(false)
{

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down
6 changes: 0 additions & 6 deletions js/src/nanojit/LIR.h
Expand Up @@ -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 <LIns*, bool> 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
Expand Down

0 comments on commit 4119caf

Please sign in to comment.