Bug 1186424: Remove AsmJS min heap length optimization; r=luke

--HG--
extra : commitid : GKnlXxtiLBM
extra : rebase_source : bb5b286b57d5374b3c155e1a82e8b34914c112d5
This commit is contained in:
Benjamin Bouvier 2015-08-28 16:53:02 +02:00
parent 3ef7347013
commit 8d1f8f824a
4 changed files with 1 additions and 35 deletions

View File

@ -10305,7 +10305,6 @@ EmitMIR(ModuleCompiler& m, const AsmFunction& function, LifoAlloc& lifo,
}
MIRGenerator *mir = f.extractMIR();
mir->initMinAsmJSHeapLength(f.m().minHeapLength());
jit::SpewBeginFunction(mir, nullptr);

View File

@ -151,13 +151,6 @@ class MIRGenerator
// Traverses the graph to find if there's any SIMD instruction. Costful but
// the value is cached, so don't worry about calling it several times.
bool usesSimd();
void initMinAsmJSHeapLength(uint32_t len) {
MOZ_ASSERT(minAsmJSHeapLength_ == 0);
minAsmJSHeapLength_ = len;
}
uint32_t minAsmJSHeapLength() const {
return minAsmJSHeapLength_;
}
bool modifiesFrameArguments() const {
return modifiesFrameArguments_;
@ -192,7 +185,6 @@ class MIRGenerator
bool performsCall_;
bool usesSimd_;
bool usesSimdCached_;
uint32_t minAsmJSHeapLength_;
// Keep track of whether frame arguments are modified during execution.
// RegAlloc needs to know this as spilling values back to their register

View File

@ -38,7 +38,6 @@ MIRGenerator::MIRGenerator(CompileCompartment* compartment, const JitCompileOpti
performsCall_(false),
usesSimd_(false),
usesSimdCached_(false),
minAsmJSHeapLength_(0),
modifiesFrameArguments_(false),
instrumentedProfiling_(false),
instrumentedProfilingIsCached_(false),

View File

@ -2248,32 +2248,8 @@ RangeAnalysis::analyze()
// First pass at collecting range info - while the beta nodes are still
// around and before truncation.
for (MInstructionIterator iter(block->begin()); iter != block->end(); iter++) {
for (MInstructionIterator iter(block->begin()); iter != block->end(); iter++)
iter->collectRangeInfoPreTrunc();
// Would have been nice to implement this using collectRangeInfoPreTrunc()
// methods but it needs the minAsmJSHeapLength().
if (mir->compilingAsmJS()) {
uint32_t minHeapLength = mir->minAsmJSHeapLength();
if (iter->isAsmJSLoadHeap()) {
MAsmJSLoadHeap* ins = iter->toAsmJSLoadHeap();
Range* range = ins->ptr()->range();
uint32_t elemSize = TypedArrayElemSize(ins->accessType());
if (range && range->hasInt32LowerBound() && range->lower() >= 0 &&
range->hasInt32UpperBound() && uint32_t(range->upper()) + elemSize <= minHeapLength) {
ins->removeBoundsCheck();
}
} else if (iter->isAsmJSStoreHeap()) {
MAsmJSStoreHeap* ins = iter->toAsmJSStoreHeap();
Range* range = ins->ptr()->range();
uint32_t elemSize = TypedArrayElemSize(ins->accessType());
if (range && range->hasInt32LowerBound() && range->lower() >= 0 &&
range->hasInt32UpperBound() && uint32_t(range->upper()) + elemSize <= minHeapLength) {
ins->removeBoundsCheck();
}
}
}
}
}
return true;