From 43b6fe8667cd7038fbc4f21d93dbe145f74c83f6 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Tue, 3 Sep 2013 11:00:24 -0500 Subject: [PATCH] Bug 911842 - OdinMonkey: disable Ion optimization passes that don't help (r=jandem) --- js/src/jit/Ion.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp index 08707cb7d99..f3e301b3e1b 100644 --- a/js/src/jit/Ion.cpp +++ b/js/src/jit/Ion.cpp @@ -1362,7 +1362,7 @@ OptimizeMIR(MIRGenerator *mir) // Passes after this point must not move instructions; these analyses // depend on knowing the final order in which instructions will execute. - if (js_IonOptions.edgeCaseAnalysis) { + if (js_IonOptions.edgeCaseAnalysis && !mir->compilingAsmJS()) { EdgeCaseAnalysis edgeCaseAnalysis(mir, graph); if (!edgeCaseAnalysis.analyzeLate()) return false; @@ -1373,14 +1373,16 @@ OptimizeMIR(MIRGenerator *mir) return false; } - // Note: check elimination has to run after all other passes that move - // instructions. Since check uses are replaced with the actual index, code - // motion after this pass could incorrectly move a load or store before its - // bounds check. - if (!EliminateRedundantChecks(graph)) - return false; - IonSpewPass("Bounds Check Elimination"); - AssertGraphCoherency(graph); + if (!mir->compilingAsmJS()) { + // Note: check elimination has to run after all other passes that move + // instructions. Since check uses are replaced with the actual index, + // code motion after this pass could incorrectly move a load or store + // before its bounds check. + if (!EliminateRedundantChecks(graph)) + return false; + IonSpewPass("Bounds Check Elimination"); + AssertGraphCoherency(graph); + } return true; }