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

Side by Side Diff: src/compiler/jump-threading.h

Issue 951553005: [turbofan] remove dependence of InstructionBlock on BasicBlock (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « src/compiler/instruction-selector-impl.h ('k') | src/compiler/jump-threading.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_JUMP_THREADING_H_ 5 #ifndef V8_COMPILER_JUMP_THREADING_H_
6 #define V8_COMPILER_JUMP_THREADING_H_ 6 #define V8_COMPILER_JUMP_THREADING_H_
7 7
8 #include "src/compiler/instruction.h" 8 #include "src/compiler/instruction.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 namespace compiler { 12 namespace compiler {
13 13
14 // Forwards jumps to empty basic blocks that end with a second jump to the 14 // Forwards jumps to empty basic blocks that end with a second jump to the
15 // destination of the second jump, transitively. 15 // destination of the second jump, transitively.
16 class JumpThreading { 16 class JumpThreading {
17 public: 17 public:
18 // Compute the forwarding map of basic blocks to their ultimate destination. 18 // Compute the forwarding map of basic blocks to their ultimate destination.
19 // Returns {true} if there is at least one block that is forwarded. 19 // Returns {true} if there is at least one block that is forwarded.
20 static bool ComputeForwarding(Zone* local_zone, 20 static bool ComputeForwarding(Zone* local_zone, ZoneVector<RpoNumber>& result,
21 ZoneVector<BasicBlock::RpoNumber>& result,
22 InstructionSequence* code); 21 InstructionSequence* code);
23 22
24 // Rewrite the instructions to forward jumps and branches. 23 // Rewrite the instructions to forward jumps and branches.
25 // May also negate some branches. 24 // May also negate some branches.
26 static void ApplyForwarding(ZoneVector<BasicBlock::RpoNumber>& forwarding, 25 static void ApplyForwarding(ZoneVector<RpoNumber>& forwarding,
27 InstructionSequence* code); 26 InstructionSequence* code);
28 }; 27 };
29 28
30 } // namespace compiler 29 } // namespace compiler
31 } // namespace internal 30 } // namespace internal
32 } // namespace v8 31 } // namespace v8
33 32
34 #endif // V8_COMPILER_JUMP_THREADING_H 33 #endif // V8_COMPILER_JUMP_THREADING_H
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector-impl.h ('k') | src/compiler/jump-threading.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698