Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(662)

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 2038083002: [Interpreter] Add a simple dead-code elimination bytecode optimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_jump_writer
Patch Set: Fix tests Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | src/interpreter/bytecode-dead-code-optimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index 5976c6686e51bd92459a8968befa8c2818ceafee..8c9896e5f43c33ed638e6fc99495bf411dad3d70 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -6,6 +6,7 @@
#include "src/compiler.h"
#include "src/interpreter/bytecode-array-writer.h"
+#include "src/interpreter/bytecode-dead-code-optimizer.h"
#include "src/interpreter/bytecode-label.h"
#include "src/interpreter/bytecode-peephole-optimizer.h"
#include "src/interpreter/bytecode-register-optimizer.h"
@@ -35,6 +36,10 @@ BytecodeArrayBuilder::BytecodeArrayBuilder(Isolate* isolate, Zone* zone,
DCHECK_GE(context_register_count_, 0);
DCHECK_GE(local_register_count_, 0);
+ if (FLAG_ignition_deadcode) {
+ pipeline_ = new (zone) BytecodeDeadCodeOptimizer(pipeline_);
+ }
+
if (FLAG_ignition_peephole) {
pipeline_ = new (zone)
BytecodePeepholeOptimizer(&constant_array_builder_, pipeline_);
« no previous file with comments | « src/flag-definitions.h ('k') | src/interpreter/bytecode-dead-code-optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698