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

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

Issue 2394213003: Named all zones in the project (Closed)
Patch Set: Merge branch 'master' into zonenames Created 4 years, 2 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/js-inlining.cc ('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 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 return state.forwarded; 138 return state.forwarded;
139 } 139 }
140 140
141 141
142 void JumpThreading::ApplyForwarding(ZoneVector<RpoNumber>& result, 142 void JumpThreading::ApplyForwarding(ZoneVector<RpoNumber>& result,
143 InstructionSequence* code) { 143 InstructionSequence* code) {
144 if (!FLAG_turbo_jt) return; 144 if (!FLAG_turbo_jt) return;
145 145
146 Zone local_zone(code->isolate()->allocator()); 146 Zone local_zone(code->isolate()->allocator(), ZONE_NAME);
147 ZoneVector<bool> skip(static_cast<int>(result.size()), false, &local_zone); 147 ZoneVector<bool> skip(static_cast<int>(result.size()), false, &local_zone);
148 148
149 // Skip empty blocks when the previous block doesn't fall through. 149 // Skip empty blocks when the previous block doesn't fall through.
150 bool prev_fallthru = true; 150 bool prev_fallthru = true;
151 for (auto const block : code->instruction_blocks()) { 151 for (auto const block : code->instruction_blocks()) {
152 int block_num = block->rpo_number().ToInt(); 152 int block_num = block->rpo_number().ToInt();
153 skip[block_num] = !prev_fallthru && result[block_num].ToInt() != block_num; 153 skip[block_num] = !prev_fallthru && result[block_num].ToInt() != block_num;
154 154
155 bool fallthru = true; 155 bool fallthru = true;
156 for (int i = block->code_start(); i < block->code_end(); ++i) { 156 for (int i = block->code_start(); i < block->code_end(); ++i) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 if (block->IsDeferred()) { 192 if (block->IsDeferred()) {
193 block->set_ao_number(RpoNumber::FromInt(ao)); 193 block->set_ao_number(RpoNumber::FromInt(ao));
194 if (!skip[block->rpo_number().ToInt()]) ao++; 194 if (!skip[block->rpo_number().ToInt()]) ao++;
195 } 195 }
196 } 196 }
197 } 197 }
198 198
199 } // namespace compiler 199 } // namespace compiler
200 } // namespace internal 200 } // namespace internal
201 } // namespace v8 201 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698