Commit 434ef2cc authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Remove deprecated --turbo-osr flag.

The flag in question used to fall-back to Crankshaft whenever an OSR
request couldn't be handled by TurboFan. By now OSR in TurboFan is
sufficiently stabilized that one single --use-osr flag should do it.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/1960043002
Cr-Commit-Position: refs/heads/master@{#36102}
parent 8758245a
......@@ -599,7 +599,7 @@ bool Renumber(ParseInfo* parse_info) {
return true;
}
bool UseTurboFan(Handle<SharedFunctionInfo> shared, BailoutId osr_ast_id) {
bool UseTurboFan(Handle<SharedFunctionInfo> shared) {
bool optimization_disabled = shared->optimization_disabled();
bool dont_crankshaft = shared->dont_crankshaft();
......@@ -616,13 +616,8 @@ bool UseTurboFan(Handle<SharedFunctionInfo> shared, BailoutId osr_ast_id) {
// 3. Explicitly enabled by the command-line filter.
bool passes_turbo_filter = shared->PassesFilter(FLAG_turbo_filter);
// If this is OSR request, OSR must be enabled by Turbofan.
bool passes_osr_test = FLAG_turbo_osr || osr_ast_id.IsNone();
return (is_turbofanable_asm ||
is_unsupported_by_crankshaft_but_turbofanable ||
passes_turbo_filter) &&
passes_osr_test;
return is_turbofanable_asm || is_unsupported_by_crankshaft_but_turbofanable ||
passes_turbo_filter;
}
bool GetOptimizedCodeNow(CompilationJob* job) {
......@@ -725,7 +720,7 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
VMState<COMPILER> state(isolate);
DCHECK(!isolate->has_pending_exception());
PostponeInterruptsScope postpone(isolate);
bool use_turbofan = UseTurboFan(shared, osr_ast_id);
bool use_turbofan = UseTurboFan(shared);
base::SmartPointer<CompilationJob> job(
use_turbofan ? compiler::Pipeline::NewCompilationJob(function)
: new HCompilationJob(function));
......@@ -927,18 +922,6 @@ MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) {
}
}
// If the debugger is active, do not compile with turbofan unless we can
// deopt from turbofan code.
if (FLAG_turbo_asm && function->shared()->asm_function() &&
(FLAG_turbo_asm_deoptimization || !isolate->debug()->is_active()) &&
!FLAG_turbo_osr) {
Handle<Code> code;
if (GetOptimizedCode(function, Compiler::NOT_CONCURRENT).ToHandle(&code)) {
DCHECK(function->shared()->is_compiled());
return code;
}
}
if (function->shared()->is_compiled()) {
return Handle<Code>(function->shared()->code());
}
......
......@@ -447,7 +447,6 @@ DEFINE_BOOL(turbo_verify_allocation, DEBUG_BOOL,
"verify register allocation in TurboFan")
DEFINE_BOOL(turbo_move_optimization, true, "optimize gap moves in TurboFan")
DEFINE_BOOL(turbo_jt, true, "enable jump threading in TurboFan")
DEFINE_BOOL(turbo_osr, true, "enable OSR in TurboFan")
DEFINE_BOOL(turbo_stress_loop_peeling, false,
"stress loop peeling optimization")
DEFINE_BOOL(turbo_cf_optimization, true, "optimize control flow in TurboFan")
......
......@@ -24113,6 +24113,7 @@ TEST(StringConcatOverflow) {
TEST(TurboAsmDisablesNeuter) {
i::FLAG_allow_natives_syntax = true;
v8::V8::Initialize();
v8::HandleScope scope(CcTest::isolate());
LocalContext context;
......@@ -24125,10 +24126,11 @@ TEST(TurboAsmDisablesNeuter) {
" return { load: load };"
"}"
"var buffer = new ArrayBuffer(4);"
"Module(this, {}, buffer).load();"
"var module = Module(this, {}, buffer);"
"%OptimizeFunctionOnNextCall(module.load);"
"module.load();"
"buffer";
i::FLAG_turbo_osr = false; // TODO(titzer): test requires eager TF.
v8::Local<v8::ArrayBuffer> result = CompileRun(load).As<v8::ArrayBuffer>();
CHECK_EQ(should_be_neuterable, result->IsNeuterable());
......@@ -24140,10 +24142,11 @@ TEST(TurboAsmDisablesNeuter) {
" return { store: store };"
"}"
"var buffer = new ArrayBuffer(4);"
"Module(this, {}, buffer).store();"
"var module = Module(this, {}, buffer);"
"%OptimizeFunctionOnNextCall(module.store);"
"module.store();"
"buffer";
i::FLAG_turbo_osr = false; // TODO(titzer): test requires eager TF.
result = CompileRun(store).As<v8::ArrayBuffer>();
CHECK_EQ(should_be_neuterable, result->IsNeuterable());
}
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
function f1() {
var sum = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
function foo(a) {
var i = a | 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
"use strict";
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
"use strict";
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
"use strict";
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --use-osr --turbo-osr
// Flags: --use-osr
function foo(a) {
var sum = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
"use strict";
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --turbo-osr --allow-natives-syntax
// Flags: --allow-natives-syntax
function test(e, f, v) {
assertEquals(e, f(v));
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --use-osr --turbo-osr
// Flags: --use-osr
function f(a) {
var sum = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --use-osr --turbo-osr
// Flags: --use-osr
function f(a) {
var sum = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --use-osr --turbo-osr
// Flags: --use-osr
function id(f) { return f; }
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --use-osr --turbo-osr
// Flags: --use-osr
function id(f) { return f; }
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --use-osr --turbo-osr
// Flags: --use-osr
function foo() {
var sum = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --use-osr --allow-natives-syntax --turbo-osr
// Flags: --use-osr --allow-natives-syntax
var global_counter = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
function foo() {
var sum = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
function mod() {
function f0() {
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
function mod() {
function f0() {
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
var counter = 111;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
var counter = 188;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --use-osr --turbo-osr
// Flags: --use-osr
function f1(a,b,c) {
var x = 0;
......
......@@ -3,7 +3,6 @@
// found in the LICENSE file.
// Flags: --use-osr
// TODO(titzer): enable --turbo-osr when nested OSR works.
function f1(a,b,c) {
var x = 0;
......
......@@ -3,7 +3,6 @@
// found in the LICENSE file.
// Flags: --use-osr
// TODO(titzer): enable --turbo-osr when nested OSR works.
function f1(a,b,c) {
var x = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
function f() {
var sum = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
function f() {
var sum = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
function f() {
var sum = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
function f() {
var sum = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
function id(f) { return f; }
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
function test() {
// Loop to force OSR.
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --use-osr --turbo-osr
// Flags: --use-osr
function f1(x) {
while (x > 0) {
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr
// Flags: --allow-natives-syntax --use-osr
"use strict";
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --turbo-osr
// Flags: --allow-natives-syntax
function OSRInsideTry(x) {
try {
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --use-osr --turbo-osr --noalways-opt
// Flags: --allow-natives-syntax --use-osr --noalways-opt
function foo() {
var c = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment