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

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

Issue 1775323002: [turbofan] Frame elision for code stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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-selector.cc ('k') | src/compiler/mips/code-generator-mips.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 #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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 TRACE(" nop\n"); 89 TRACE(" nop\n");
90 continue; 90 continue;
91 } else if (instr->arch_opcode() == kArchJmp) { 91 } else if (instr->arch_opcode() == kArchJmp) {
92 // try to forward the jump instruction. 92 // try to forward the jump instruction.
93 TRACE(" jmp\n"); 93 TRACE(" jmp\n");
94 // if this block deconstructs the frame, we can't forward it. 94 // if this block deconstructs the frame, we can't forward it.
95 // TODO(mtrofin): we can still forward if we end up building 95 // TODO(mtrofin): we can still forward if we end up building
96 // the frame at start. So we should move the decision of whether 96 // the frame at start. So we should move the decision of whether
97 // to build a frame or not in the register allocator, and trickle it 97 // to build a frame or not in the register allocator, and trickle it
98 // here and to the code generator. 98 // here and to the code generator.
99 if (frame_at_start || !block->must_deconstruct_frame()) { 99 if (frame_at_start ||
100 !(block->must_deconstruct_frame() ||
101 block->must_construct_frame())) {
100 fw = code->InputRpo(instr, 0); 102 fw = code->InputRpo(instr, 0);
101 } 103 }
102 fallthru = false; 104 fallthru = false;
103 } else { 105 } else {
104 // can't skip other instructions. 106 // can't skip other instructions.
105 TRACE(" other\n"); 107 TRACE(" other\n");
106 fallthru = false; 108 fallthru = false;
107 } 109 }
108 break; 110 break;
109 } 111 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 if (block->IsDeferred()) { 192 if (block->IsDeferred()) {
191 block->set_ao_number(RpoNumber::FromInt(ao)); 193 block->set_ao_number(RpoNumber::FromInt(ao));
192 if (!skip[block->rpo_number().ToInt()]) ao++; 194 if (!skip[block->rpo_number().ToInt()]) ao++;
193 } 195 }
194 } 196 }
195 } 197 }
196 198
197 } // namespace compiler 199 } // namespace compiler
198 } // namespace internal 200 } // namespace internal
199 } // namespace v8 201 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698