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

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

Issue 1041163002: [turbofan] smash GapInstruction into Instruction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: arm compile Created 5 years, 8 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.cc ('k') | src/compiler/move-optimizer.h » ('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 #include "src/compiler/jump-threading.h" 5 #include "src/compiler/jump-threading.h"
6 #include "src/compiler/code-generator-impl.h" 6 #include "src/compiler/code-generator-impl.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // Process the stack, which implements DFS through empty blocks. 69 // Process the stack, which implements DFS through empty blocks.
70 while (!state.stack.empty()) { 70 while (!state.stack.empty()) {
71 InstructionBlock* block = code->InstructionBlockAt(state.stack.top()); 71 InstructionBlock* block = code->InstructionBlockAt(state.stack.top());
72 // Process the instructions in a block up to a non-empty instruction. 72 // Process the instructions in a block up to a non-empty instruction.
73 TRACE("jt [%d] B%d\n", static_cast<int>(stack.size()), 73 TRACE("jt [%d] B%d\n", static_cast<int>(stack.size()),
74 block->rpo_number().ToInt()); 74 block->rpo_number().ToInt());
75 bool fallthru = true; 75 bool fallthru = true;
76 RpoNumber fw = block->rpo_number(); 76 RpoNumber fw = block->rpo_number();
77 for (int i = block->code_start(); i < block->code_end(); ++i) { 77 for (int i = block->code_start(); i < block->code_end(); ++i) {
78 Instruction* instr = code->InstructionAt(i); 78 Instruction* instr = code->InstructionAt(i);
79 if (instr->IsGapMoves() && GapInstruction::cast(instr)->IsRedundant()) { 79 if (!instr->AreMovesRedundant()) {
80 // skip redundant gap moves. 80 // can't skip instructions with non redundant moves.
81 TRACE(" nop gap\n"); 81 TRACE(" parallel move\n");
82 continue; 82 fallthru = false;
83 } else if (instr->IsSourcePosition()) { 83 } else if (instr->IsSourcePosition()) {
84 // skip source positions. 84 // skip source positions.
85 TRACE(" src pos\n"); 85 TRACE(" src pos\n");
86 continue; 86 continue;
87 } else if (FlagsModeField::decode(instr->opcode()) != kFlags_none) { 87 } else if (FlagsModeField::decode(instr->opcode()) != kFlags_none) {
88 // can't skip instructions with flags continuations. 88 // can't skip instructions with flags continuations.
89 TRACE(" flags\n"); 89 TRACE(" flags\n");
90 fallthru = false; 90 fallthru = false;
91 } else if (instr->IsNop()) { 91 } else if (instr->IsNop()) {
92 // skip nops. 92 // skip nops.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 if (block->IsDeferred()) { 187 if (block->IsDeferred()) {
188 block->set_ao_number(RpoNumber::FromInt(ao)); 188 block->set_ao_number(RpoNumber::FromInt(ao));
189 if (!skip[block->rpo_number().ToInt()]) ao++; 189 if (!skip[block->rpo_number().ToInt()]) ao++;
190 } 190 }
191 } 191 }
192 } 192 }
193 193
194 } // namespace compiler 194 } // namespace compiler
195 } // namespace internal 195 } // namespace internal
196 } // namespace v8 196 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/move-optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698