Skip to content

Commit

Permalink
[dart/vm] Check SSA def-use dominance only
Browse files Browse the repository at this point in the history
Rationale:
PushArguments violate some def-use dominance relations
after inlining. Fixing this seems not worth the engineering
effort. Rather we wait until we remove PushArguments
altogether (the optimizing compiler has no need for them).

#36899

Change-Id: I9265420ae8ec4981fe7170b9a1869dd56ae323cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111880
Reviewed-by: Martin Kustermann <[email protected]>
Commit-Queue: Aart Bik <[email protected]>
  • Loading branch information
aartbik authored and [email protected] committed Aug 2, 2019
1 parent 9bb446a commit 19085e3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions runtime/vm/compiler/backend/flow_graph_checker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ DEFINE_FLAG(int,
"Definition count threshold for extensive instruction checks");

// Returns true for the "optimized out" and "null" constant.
// Such constants reside outside the IR in the sense that
// succ/pred/block links are not maintained.
static bool IsSpecialConstant(Definition* def) {
if (auto c = def->AsConstant()) {
return c->value().raw() == Symbols::OptimizedOut().raw() ||
Expand Down Expand Up @@ -311,7 +313,7 @@ void FlowGraphChecker::VisitDefUse(Definition* def,
ASSERT(instruction->InputAt(use->use_index()) == use);
}
// Make sure each use appears in the graph and is properly dominated
// by the defintion (note that the proper dominance relation on the
// by the definition (note that the proper dominance relation on the
// input values of Phis is checked by the Phi visitor below).
if (instruction->IsPhi()) {
ASSERT(instruction->AsPhi()->is_alive());
Expand All @@ -327,8 +329,7 @@ void FlowGraphChecker::VisitDefUse(Definition* def,
// Others are fully linked into graph.
ASSERT(IsControlFlow(instruction) || instruction->next() != nullptr);
ASSERT(instruction->previous() != nullptr);
ASSERT(is_env || // TODO(dartbug.com/36899)
DefDominatesUse(def, instruction));
ASSERT(!def->HasSSATemp() || DefDominatesUse(def, instruction));
}
}

Expand Down

0 comments on commit 19085e3

Please sign in to comment.