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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/schedule.h ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/schedule.cc
diff --git a/src/compiler/schedule.cc b/src/compiler/schedule.cc
index 8924ae54401a0c8919281228d7f7bdd70a8adfd9..ec0caf0008cab5e1a8d91ee1af0ab2c3a957fbf1 100644
--- a/src/compiler/schedule.cc
+++ b/src/compiler/schedule.cc
@@ -100,6 +100,8 @@ std::ostream& operator<<(std::ostream& os, const BasicBlock::Control& c) {
return os << "none";
case BasicBlock::kGoto:
return os << "goto";
+ case BasicBlock::kCall:
+ return os << "call";
case BasicBlock::kBranch:
return os << "branch";
case BasicBlock::kSwitch:
@@ -194,16 +196,27 @@ void Schedule::AddNode(BasicBlock* block, Node* node) {
void Schedule::AddGoto(BasicBlock* block, BasicBlock* succ) {
- DCHECK(block->control() == BasicBlock::kNone);
+ DCHECK_EQ(BasicBlock::kNone, block->control());
block->set_control(BasicBlock::kGoto);
AddSuccessor(block, succ);
}
+void Schedule::AddCall(BasicBlock* block, Node* call, BasicBlock* success_block,
+ BasicBlock* exception_block) {
+ DCHECK_EQ(BasicBlock::kNone, block->control());
+ DCHECK_EQ(IrOpcode::kCall, call->opcode());
+ block->set_control(BasicBlock::kCall);
+ AddSuccessor(block, success_block);
+ AddSuccessor(block, exception_block);
+ SetControlInput(block, call);
+}
+
+
void Schedule::AddBranch(BasicBlock* block, Node* branch, BasicBlock* tblock,
BasicBlock* fblock) {
- DCHECK(block->control() == BasicBlock::kNone);
- DCHECK(branch->opcode() == IrOpcode::kBranch);
+ DCHECK_EQ(BasicBlock::kNone, block->control());
+ DCHECK_EQ(IrOpcode::kBranch, branch->opcode());
block->set_control(BasicBlock::kBranch);
AddSuccessor(block, tblock);
AddSuccessor(block, fblock);
@@ -224,7 +237,7 @@ void Schedule::AddSwitch(BasicBlock* block, Node* sw, BasicBlock** succ_blocks,
void Schedule::AddReturn(BasicBlock* block, Node* input) {
- DCHECK(block->control() == BasicBlock::kNone);
+ DCHECK_EQ(BasicBlock::kNone, block->control());
block->set_control(BasicBlock::kReturn);
SetControlInput(block, input);
if (block != end()) AddSuccessor(block, end());
@@ -232,7 +245,7 @@ void Schedule::AddReturn(BasicBlock* block, Node* input) {
void Schedule::AddThrow(BasicBlock* block, Node* input) {
- DCHECK(block->control() == BasicBlock::kNone);
+ DCHECK_EQ(BasicBlock::kNone, block->control());
block->set_control(BasicBlock::kThrow);
SetControlInput(block, input);
if (block != end()) AddSuccessor(block, end());
@@ -241,8 +254,8 @@ void Schedule::AddThrow(BasicBlock* block, Node* input) {
void Schedule::InsertBranch(BasicBlock* block, BasicBlock* end, Node* branch,
BasicBlock* tblock, BasicBlock* fblock) {
- DCHECK(block->control() != BasicBlock::kNone);
- DCHECK(end->control() == BasicBlock::kNone);
+ DCHECK_NE(BasicBlock::kNone, block->control());
+ DCHECK_EQ(BasicBlock::kNone, end->control());
end->set_control(block->control());
block->set_control(BasicBlock::kBranch);
MoveSuccessors(block, end);
« 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