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

Side by Side Diff: src/compiler/schedule.cc

Issue 1849603002: [turbofan] Effect linearization after representation inference. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks 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/pipeline.cc ('k') | src/compiler/scheduler.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/schedule.h" 5 #include "src/compiler/schedule.h"
6 6
7 #include "src/compiler/node.h" 7 #include "src/compiler/node.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 #include "src/ostreams.h" 9 #include "src/ostreams.h"
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 SetBlockForNode(block, node); 192 SetBlockForNode(block, node);
193 } 193 }
194 194
195 195
196 void Schedule::AddGoto(BasicBlock* block, BasicBlock* succ) { 196 void Schedule::AddGoto(BasicBlock* block, BasicBlock* succ) {
197 DCHECK_EQ(BasicBlock::kNone, block->control()); 197 DCHECK_EQ(BasicBlock::kNone, block->control());
198 block->set_control(BasicBlock::kGoto); 198 block->set_control(BasicBlock::kGoto);
199 AddSuccessor(block, succ); 199 AddSuccessor(block, succ);
200 } 200 }
201 201
202 #if DEBUG
203 namespace {
204
205 bool IsPotentiallyThrowingCall(IrOpcode::Value opcode) {
206 switch (opcode) {
207 #define BUILD_BLOCK_JS_CASE(Name) case IrOpcode::k##Name:
208 JS_OP_LIST(BUILD_BLOCK_JS_CASE)
209 #undef BUILD_BLOCK_JS_CASE
210 case IrOpcode::kCall:
211 return true;
212 default:
213 return false;
214 }
215 }
216
217 } // namespace
218 #endif // DEBUG
202 219
203 void Schedule::AddCall(BasicBlock* block, Node* call, BasicBlock* success_block, 220 void Schedule::AddCall(BasicBlock* block, Node* call, BasicBlock* success_block,
204 BasicBlock* exception_block) { 221 BasicBlock* exception_block) {
205 DCHECK_EQ(BasicBlock::kNone, block->control()); 222 DCHECK_EQ(BasicBlock::kNone, block->control());
206 DCHECK_EQ(IrOpcode::kCall, call->opcode()); 223 DCHECK(IsPotentiallyThrowingCall(call->opcode()));
207 block->set_control(BasicBlock::kCall); 224 block->set_control(BasicBlock::kCall);
208 AddSuccessor(block, success_block); 225 AddSuccessor(block, success_block);
209 AddSuccessor(block, exception_block); 226 AddSuccessor(block, exception_block);
210 SetControlInput(block, call); 227 SetControlInput(block, call);
211 } 228 }
212 229
213 230
214 void Schedule::AddBranch(BasicBlock* block, Node* branch, BasicBlock* tblock, 231 void Schedule::AddBranch(BasicBlock* block, Node* branch, BasicBlock* tblock,
215 BasicBlock* fblock) { 232 BasicBlock* fblock) {
216 DCHECK_EQ(BasicBlock::kNone, block->control()); 233 DCHECK_EQ(BasicBlock::kNone, block->control());
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 456 }
440 os << "\n"; 457 os << "\n";
441 } 458 }
442 } 459 }
443 return os; 460 return os;
444 } 461 }
445 462
446 } // namespace compiler 463 } // namespace compiler
447 } // namespace internal 464 } // namespace internal
448 } // namespace v8 465 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698