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

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

Issue 928213003: Model exceptional edges from call nodes in TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 10 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/schedule.h ('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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return b1; 93 return b1;
94 } 94 }
95 95
96 96
97 std::ostream& operator<<(std::ostream& os, const BasicBlock::Control& c) { 97 std::ostream& operator<<(std::ostream& os, const BasicBlock::Control& c) {
98 switch (c) { 98 switch (c) {
99 case BasicBlock::kNone: 99 case BasicBlock::kNone:
100 return os << "none"; 100 return os << "none";
101 case BasicBlock::kGoto: 101 case BasicBlock::kGoto:
102 return os << "goto"; 102 return os << "goto";
103 case BasicBlock::kCall:
104 return os << "call";
103 case BasicBlock::kBranch: 105 case BasicBlock::kBranch:
104 return os << "branch"; 106 return os << "branch";
105 case BasicBlock::kSwitch: 107 case BasicBlock::kSwitch:
106 return os << "switch"; 108 return os << "switch";
107 case BasicBlock::kReturn: 109 case BasicBlock::kReturn:
108 return os << "return"; 110 return os << "return";
109 case BasicBlock::kThrow: 111 case BasicBlock::kThrow:
110 return os << "throw"; 112 return os << "throw";
111 } 113 }
112 UNREACHABLE(); 114 UNREACHABLE();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 195 }
194 196
195 197
196 void Schedule::AddGoto(BasicBlock* block, BasicBlock* succ) { 198 void Schedule::AddGoto(BasicBlock* block, BasicBlock* succ) {
197 DCHECK(block->control() == BasicBlock::kNone); 199 DCHECK(block->control() == BasicBlock::kNone);
198 block->set_control(BasicBlock::kGoto); 200 block->set_control(BasicBlock::kGoto);
199 AddSuccessor(block, succ); 201 AddSuccessor(block, succ);
200 } 202 }
201 203
202 204
205 void Schedule::AddCall(BasicBlock* block, Node* call, BasicBlock* success_block,
206 BasicBlock* exception_block) {
207 DCHECK(block->control() == BasicBlock::kNone);
Benedikt Meurer 2015/02/17 18:31:39 Nit: Use DCHECK_EQ here.
Michael Starzinger 2015/02/18 14:03:56 Done. Here, and throughout this file in general.
208 DCHECK(call->opcode() == IrOpcode::kCall);
Benedikt Meurer 2015/02/17 18:31:39 Nit: Use DCHECK_EQ here.
Michael Starzinger 2015/02/18 14:03:56 Done.
209 block->set_control(BasicBlock::kCall);
210 AddSuccessor(block, success_block);
211 AddSuccessor(block, exception_block);
212 SetControlInput(block, call);
213 }
214
215
203 void Schedule::AddBranch(BasicBlock* block, Node* branch, BasicBlock* tblock, 216 void Schedule::AddBranch(BasicBlock* block, Node* branch, BasicBlock* tblock,
204 BasicBlock* fblock) { 217 BasicBlock* fblock) {
205 DCHECK(block->control() == BasicBlock::kNone); 218 DCHECK(block->control() == BasicBlock::kNone);
206 DCHECK(branch->opcode() == IrOpcode::kBranch); 219 DCHECK(branch->opcode() == IrOpcode::kBranch);
207 block->set_control(BasicBlock::kBranch); 220 block->set_control(BasicBlock::kBranch);
208 AddSuccessor(block, tblock); 221 AddSuccessor(block, tblock);
209 AddSuccessor(block, fblock); 222 AddSuccessor(block, fblock);
210 SetControlInput(block, branch); 223 SetControlInput(block, branch);
211 } 224 }
212 225
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 } 359 }
347 os << "\n"; 360 os << "\n";
348 } 361 }
349 } 362 }
350 return os; 363 return os;
351 } 364 }
352 365
353 } // namespace compiler 366 } // namespace compiler
354 } // namespace internal 367 } // namespace internal
355 } // namespace v8 368 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/schedule.h ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698