diff options
Diffstat (limited to 'src/qml/compiler/qv4ssa.cpp')
-rw-r--r-- | src/qml/compiler/qv4ssa.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index 449caeebb5..89101ad756 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -5195,12 +5195,15 @@ void Optimizer::run(QQmlEnginePrivate *qmlEngine, bool doTypeInference, bool pee cleanupBasicBlocks(function); function->removeSharedExpressions(); - + int statementCount = 0; + foreach (BasicBlock *bb, function->basicBlocks()) + if (!bb->isRemoved()) + statementCount += bb->statementCount(); // showMeTheCode(function); static bool doSSA = qEnvironmentVariableIsEmpty("QV4_NO_SSA"); - if (!function->hasTry && !function->hasWith && !function->module->debugMode && doSSA) { + if (!function->hasTry && !function->hasWith && !function->module->debugMode && doSSA && statementCount <= 300) { // qout << "SSA for " << (function->name ? qPrintable(*function->name) : "<anonymous>") << endl; ConvertArgLocals(function).toTemps(); |