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

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

Issue 1119683002: Mark instruction blocks with spills (for frame elision). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improved printing of blocks Created 5 years, 7 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 | « no previous file | src/compiler/instruction.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 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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/frame-elider.h" 6 #include "src/compiler/frame-elider.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
11 11
12 FrameElider::FrameElider(InstructionSequence* code) : code_(code) {} 12 FrameElider::FrameElider(InstructionSequence* code) : code_(code) {}
13 13
14 void FrameElider::Run() { 14 void FrameElider::Run() {
15 MarkBlocks(); 15 MarkBlocks();
16 PropagateMarks(); 16 PropagateMarks();
17 MarkDeConstruction(); 17 MarkDeConstruction();
18 } 18 }
19 19
20 20
21 void FrameElider::MarkBlocks() { 21 void FrameElider::MarkBlocks() {
22 for (auto block : instruction_blocks()) { 22 for (auto block : instruction_blocks()) {
23 if (block->needs_frame()) continue;
23 for (auto i = block->code_start(); i < block->code_end(); ++i) { 24 for (auto i = block->code_start(); i < block->code_end(); ++i) {
24 if (InstructionAt(i)->IsCall()) { 25 if (InstructionAt(i)->IsCall()) {
25 block->mark_needs_frame(); 26 block->mark_needs_frame();
26 break; 27 break;
27 } 28 }
28 } 29 }
29 } 30 }
30 } 31 }
31 32
32 33
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 121 }
121 122
122 123
123 Instruction* FrameElider::InstructionAt(int index) const { 124 Instruction* FrameElider::InstructionAt(int index) const {
124 return code_->InstructionAt(index); 125 return code_->InstructionAt(index);
125 } 126 }
126 127
127 } // namespace compiler 128 } // namespace compiler
128 } // namespace internal 129 } // namespace internal
129 } // namespace v8 130 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698