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

Unified Diff: src/compiler/instruction-selector.cc

Issue 928213003: Model exceptional edges from call nodes in TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments by Benedikt Meurer. 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
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index e8a52a61e12213577b48711ba768ad36ac117252..f0c72653e816bd3073022e22aee3c2000303b4a6 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -503,6 +503,17 @@ void InstructionSelector::VisitControl(BasicBlock* block) {
switch (block->control()) {
case BasicBlock::kGoto:
return VisitGoto(block->SuccessorAt(0));
+ case BasicBlock::kCall: {
+ DCHECK_EQ(IrOpcode::kCall, input->opcode());
+ BasicBlock* success = block->SuccessorAt(0);
+ BasicBlock* exception = block->SuccessorAt(1);
+ // SSA deconstruction requires targets of branches not to have phis.
+ // Edge split form guarantees this property, but is more strict.
+ CheckNoPhis(success);
titzer 2015/02/17 10:32:52 We could probably CheckNoPhis for all blocks if Su
Michael Starzinger 2015/02/17 10:58:29 Done. Also inlined the CheckNoPhis helper as per o
+ CheckNoPhis(exception);
+ // TODO(mstarzinger): Record location of {exception} in {handler_table}.
+ return VisitCall(input), VisitGoto(success);
+ }
case BasicBlock::kBranch: {
DCHECK_EQ(IrOpcode::kBranch, input->opcode());
BasicBlock* tbranch = block->SuccessorAt(0);
@@ -700,6 +711,8 @@ void InstructionSelector::VisitNode(Node* node) {
case IrOpcode::kBranch:
case IrOpcode::kIfTrue:
case IrOpcode::kIfFalse:
+ case IrOpcode::kIfException:
+ case IrOpcode::kIfSuccess:
case IrOpcode::kSwitch:
case IrOpcode::kCase:
case IrOpcode::kEffectPhi:

Powered by Google App Engine
This is Rietveld 408576698