diff --git a/runtime/tests/vm/dart/gc/chunked_binary_trees_array_test.dart b/runtime/tests/vm/dart/gc/chunked_binary_trees_array_test.dart index 4574719341c..0f94b2a02b4 100644 --- a/runtime/tests/vm/dart/gc/chunked_binary_trees_array_test.dart +++ b/runtime/tests/vm/dart/gc/chunked_binary_trees_array_test.dart @@ -6,7 +6,6 @@ // VMOptions=--verify_store_buffer // VMOptions=--verify_after_marking // VMOptions=--stress_write_barrier_elimination -// VMOptions=--no_eliminate_write_barriers // VMOptions=--no_inline_alloc // Stress test for write barrier elimination that leaves many stores with diff --git a/runtime/tests/vm/dart/gc/chunked_binary_trees_test.dart b/runtime/tests/vm/dart/gc/chunked_binary_trees_test.dart index 99cc4bdb70f..fb7c25cf93a 100644 --- a/runtime/tests/vm/dart/gc/chunked_binary_trees_test.dart +++ b/runtime/tests/vm/dart/gc/chunked_binary_trees_test.dart @@ -6,7 +6,6 @@ // VMOptions=--verify_store_buffer // VMOptions=--verify_after_marking // VMOptions=--stress_write_barrier_elimination -// VMOptions=--no_eliminate_write_barriers // VMOptions=--no_inline_alloc // Stress test for write barrier elimination that leaves many stores with diff --git a/runtime/tests/vm/dart/gc/splay_c_finalizer_test.dart b/runtime/tests/vm/dart/gc/splay_c_finalizer_test.dart index 6e0c2a551bc..5511c562617 100644 --- a/runtime/tests/vm/dart/gc/splay_c_finalizer_test.dart +++ b/runtime/tests/vm/dart/gc/splay_c_finalizer_test.dart @@ -27,7 +27,6 @@ // VMOptions=--verify_store_buffer // VMOptions=--verify_after_marking // VMOptions=--stress_write_barrier_elimination -// VMOptions=--no_eliminate_write_barriers // VMOptions=--no_inline_alloc // VMOptions=--old_gen_heap_size=150 diff --git a/runtime/tests/vm/dart/gc/splay_dart_finalizer_test.dart b/runtime/tests/vm/dart/gc/splay_dart_finalizer_test.dart index f78f6a4e73a..ee7e6c1a83c 100644 --- a/runtime/tests/vm/dart/gc/splay_dart_finalizer_test.dart +++ b/runtime/tests/vm/dart/gc/splay_dart_finalizer_test.dart @@ -27,7 +27,6 @@ // VMOptions=--verify_store_buffer // VMOptions=--verify_after_marking // VMOptions=--stress_write_barrier_elimination -// VMOptions=--no_eliminate_write_barriers // VMOptions=--no_inline_alloc // VMOptions=--old_gen_heap_size=150 diff --git a/runtime/tests/vm/dart/gc/splay_ephemeron_test.dart b/runtime/tests/vm/dart/gc/splay_ephemeron_test.dart index 4d55277518a..3a7ed8fd081 100644 --- a/runtime/tests/vm/dart/gc/splay_ephemeron_test.dart +++ b/runtime/tests/vm/dart/gc/splay_ephemeron_test.dart @@ -29,7 +29,6 @@ // VMOptions=--verify_store_buffer // VMOptions=--verify_after_marking // VMOptions=--stress_write_barrier_elimination -// VMOptions=--no_eliminate_write_barriers // VMOptions=--no_inline_alloc // VMOptions=--old_gen_heap_size=150 diff --git a/runtime/tests/vm/dart/gc/splay_test.dart b/runtime/tests/vm/dart/gc/splay_test.dart index c688b36800b..be4175ecba2 100644 --- a/runtime/tests/vm/dart/gc/splay_test.dart +++ b/runtime/tests/vm/dart/gc/splay_test.dart @@ -27,7 +27,6 @@ // VMOptions=--profiler --verify_store_buffer // VMOptions=--profiler --verify_after_marking // VMOptions=--profiler --stress_write_barrier_elimination -// VMOptions=--profiler --no_eliminate_write_barriers // VMOptions=--profiler --no_inline_alloc // VMOptions=--profiler --old_gen_heap_size=100 // VMOptions=--profiler --mark_when_idle diff --git a/runtime/tests/vm/dart/gc/splay_weak_test.dart b/runtime/tests/vm/dart/gc/splay_weak_test.dart index f9f446a0a3e..7112a0bb5fb 100644 --- a/runtime/tests/vm/dart/gc/splay_weak_test.dart +++ b/runtime/tests/vm/dart/gc/splay_weak_test.dart @@ -27,7 +27,6 @@ // VMOptions=--verify_store_buffer // VMOptions=--verify_after_marking // VMOptions=--stress_write_barrier_elimination -// VMOptions=--no_eliminate_write_barriers // VMOptions=--no_inline_alloc // VMOptions=--old_gen_heap_size=150 diff --git a/runtime/tests/vm/dart_2/gc/splay_c_finalizer_test.dart b/runtime/tests/vm/dart_2/gc/splay_c_finalizer_test.dart index 57b19c1f98c..e65e9812755 100644 --- a/runtime/tests/vm/dart_2/gc/splay_c_finalizer_test.dart +++ b/runtime/tests/vm/dart_2/gc/splay_c_finalizer_test.dart @@ -31,7 +31,6 @@ // VMOptions=--verify_store_buffer // VMOptions=--verify_after_marking // VMOptions=--stress_write_barrier_elimination -// VMOptions=--no_eliminate_write_barriers // VMOptions=--no_inline_alloc // VMOptions=--old_gen_heap_size=150 diff --git a/runtime/tests/vm/dart_2/gc/splay_dart_finalizer_test.dart b/runtime/tests/vm/dart_2/gc/splay_dart_finalizer_test.dart index f66981706f4..06d2144cd6c 100644 --- a/runtime/tests/vm/dart_2/gc/splay_dart_finalizer_test.dart +++ b/runtime/tests/vm/dart_2/gc/splay_dart_finalizer_test.dart @@ -31,7 +31,6 @@ // VMOptions=--verify_store_buffer // VMOptions=--verify_after_marking // VMOptions=--stress_write_barrier_elimination -// VMOptions=--no_eliminate_write_barriers // VMOptions=--no_inline_alloc // VMOptions=--old_gen_heap_size=150 diff --git a/runtime/tests/vm/dart_2/gc/splay_ephemeron_test.dart b/runtime/tests/vm/dart_2/gc/splay_ephemeron_test.dart index a7c8db91ef4..5fed0a22840 100644 --- a/runtime/tests/vm/dart_2/gc/splay_ephemeron_test.dart +++ b/runtime/tests/vm/dart_2/gc/splay_ephemeron_test.dart @@ -33,7 +33,6 @@ // VMOptions=--verify_store_buffer // VMOptions=--verify_after_marking // VMOptions=--stress_write_barrier_elimination -// VMOptions=--no_eliminate_write_barriers // VMOptions=--no_inline_alloc // VMOptions=--old_gen_heap_size=150 diff --git a/runtime/tests/vm/dart_2/gc/splay_test.dart b/runtime/tests/vm/dart_2/gc/splay_test.dart index 9c087e10f2a..2a6e6e73906 100644 --- a/runtime/tests/vm/dart_2/gc/splay_test.dart +++ b/runtime/tests/vm/dart_2/gc/splay_test.dart @@ -31,7 +31,6 @@ // VMOptions=--profiler --verify_store_buffer // VMOptions=--profiler --verify_after_marking // VMOptions=--profiler --stress_write_barrier_elimination -// VMOptions=--profiler --no_eliminate_write_barriers // VMOptions=--profiler --no_inline_alloc // VMOptions=--profiler --old_gen_heap_size=100 // VMOptions=--profiler --mark_when_idle diff --git a/runtime/tests/vm/dart_2/gc/splay_weak_test.dart b/runtime/tests/vm/dart_2/gc/splay_weak_test.dart index f201e3483ff..f0ec591d258 100644 --- a/runtime/tests/vm/dart_2/gc/splay_weak_test.dart +++ b/runtime/tests/vm/dart_2/gc/splay_weak_test.dart @@ -31,7 +31,6 @@ // VMOptions=--verify_store_buffer // VMOptions=--verify_after_marking // VMOptions=--stress_write_barrier_elimination -// VMOptions=--no_eliminate_write_barriers // VMOptions=--no_inline_alloc // VMOptions=--old_gen_heap_size=150 diff --git a/runtime/vm/compiler/compiler_pass.cc b/runtime/vm/compiler/compiler_pass.cc index 37a9f8bb45a..192a845fd5b 100644 --- a/runtime/vm/compiler/compiler_pass.cc +++ b/runtime/vm/compiler/compiler_pass.cc @@ -585,11 +585,7 @@ COMPILER_PASS(ReorderBlocks, { } }); -COMPILER_PASS(EliminateWriteBarriers, { - if (FLAG_eliminate_write_barriers) { - EliminateWriteBarriers(flow_graph); - } -}); +COMPILER_PASS(EliminateWriteBarriers, { EliminateWriteBarriers(flow_graph); }); COMPILER_PASS(FinalizeGraph, { // At the end of the pipeline, force recomputing and caching graph diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h index b1cebaba768..92264e535b1 100644 --- a/runtime/vm/flag_list.h +++ b/runtime/vm/flag_list.h @@ -246,8 +246,6 @@ constexpr bool FLAG_support_il_printer = false; "Enable magical pragmas for testing purposes. Use at your own risk!") \ R(eliminate_type_checks, true, bool, true, \ "Eliminate type checks when allowed by static type analysis.") \ - P(eliminate_write_barriers, bool, true, \ - "Eliminate write barriers when allowed by allocation invariants.") \ D(support_rr, bool, false, "Support running within RR.") \ P(verify_entry_points, bool, false, \ "Throw API error on invalid member access through native API. See " \ diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc index 4a529c152c2..e53d8b62c61 100644 --- a/runtime/vm/thread.cc +++ b/runtime/vm/thread.cc @@ -1023,7 +1023,6 @@ class RestoreWriteBarrierInvariantVisitor : public ObjectPointerVisitor { void Thread::RestoreWriteBarrierInvariant(RestoreWriteBarrierInvariantOp op) { ASSERT(IsAtSafepoint() || OwnsGCSafepoint()); ASSERT(IsDartMutatorThread()); - if (!FLAG_eliminate_write_barriers) return; const StackFrameIterator::CrossThreadPolicy cross_thread_policy = StackFrameIterator::kAllowCrossThreadIteration;