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

Side by Side Diff: src/compiler/frame-elider.cc

Issue 1810333003: [turbofan] Move frame elision logic to the end (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/frame-elider.h ('k') | src/compiler/pipeline.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/frame-elider.h"
5 #include "src/base/adapters.h" 6 #include "src/base/adapters.h"
6 #include "src/compiler/frame-elider.h" 7 #include "src/compiler/linkage.h"
7 8
8 namespace v8 { 9 namespace v8 {
9 namespace internal { 10 namespace internal {
10 namespace compiler { 11 namespace compiler {
11 12
12 FrameElider::FrameElider(InstructionSequence* code) : code_(code) {} 13 FrameElider::FrameElider(InstructionSequence* code) : code_(code) {}
13 14
14 void FrameElider::Run() { 15 void FrameElider::Run(const CallDescriptor* descriptor) {
15 MarkBlocks(); 16 if (descriptor != nullptr && descriptor->RequiresFrameAsIncoming()) {
danno 2016/03/18 18:13:00 Passing in the CallDescriptor here seems weird. I
Mircea Trofin 2016/03/18 18:22:31 Done.
17 instruction_blocks()[0]->mark_needs_frame();
18 } else {
19 MarkBlocks();
20 }
16 PropagateMarks(); 21 PropagateMarks();
17 MarkDeConstruction(); 22 MarkDeConstruction();
18 } 23 }
19 24
20 25
21 void FrameElider::MarkBlocks() { 26 void FrameElider::MarkBlocks() {
22 for (InstructionBlock* block : instruction_blocks()) { 27 for (InstructionBlock* block : instruction_blocks()) {
23 if (block->needs_frame()) continue; 28 if (block->needs_frame()) continue;
24 for (int i = block->code_start(); i < block->code_end(); ++i) { 29 for (int i = block->code_start(); i < block->code_end(); ++i) {
25 if (InstructionAt(i)->IsCall() || 30 if (InstructionAt(i)->IsCall() ||
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 127 }
123 128
124 129
125 Instruction* FrameElider::InstructionAt(int index) const { 130 Instruction* FrameElider::InstructionAt(int index) const {
126 return code_->InstructionAt(index); 131 return code_->InstructionAt(index);
127 } 132 }
128 133
129 } // namespace compiler 134 } // namespace compiler
130 } // namespace internal 135 } // namespace internal
131 } // namespace v8 136 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/frame-elider.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698