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

Side by Side Diff: src/interpreter/bytecode-dead-code-optimizer.h

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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_INTERPRETER_BYTECODE_DEAD_CODE_OPTIMIZER_H_
6 #define V8_INTERPRETER_BYTECODE_DEAD_CODE_OPTIMIZER_H_
7
8 #include "src/interpreter/bytecode-pipeline.h"
9
10 namespace v8 {
11 namespace internal {
12 namespace interpreter {
13
14 // An optimization stage for eliminating obviously dead code in bytecode
15 // generation.
16 class BytecodeDeadCodeOptimizer final : public BytecodePipelineStage,
17 public ZoneObject {
18 public:
19 explicit BytecodeDeadCodeOptimizer(BytecodePipelineStage* next_stage);
20
21 // BytecodePipelineStage interface.
22 void Write(BytecodeNode* node) override;
23 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override;
24 void BindLabel(BytecodeLabel* label) override;
25 void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override;
26 Handle<BytecodeArray> ToBytecodeArray(
27 int fixed_register_count, int parameter_count,
28 Handle<FixedArray> handler_table) override;
29
30 private:
31 BytecodePipelineStage* next_stage_;
32 bool exit_seen_in_block_;
33
34 DISALLOW_COPY_AND_ASSIGN(BytecodeDeadCodeOptimizer);
35 };
36
37 } // namespace interpreter
38 } // namespace internal
39 } // namespace v8
40
41 #endif // V8_INTERPRETER_BYTECODE_DEAD_CODE_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-dead-code-optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698