[turbofan] Don't try to inling dead nodes.
The JSInliningHeuristic keeps a list of nodes, which might have been killed by other reducers before the JSInliningHeuristic looks at it again, so it has to check whether nodes are dead before trying to expand them later (this is similar to what the ValueNumberingReducer needs to do with its internal table). R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/1508643002 Cr-Commit-Position: refs/heads/master@{#32652}
This commit is contained in:
parent
4e2c0dd7a9
commit
1c44aa0e8d
@ -107,12 +107,15 @@ void JSInliningHeuristic::Finalize() {
|
||||
auto i = candidates_.begin();
|
||||
Candidate candidate = *i;
|
||||
candidates_.erase(i);
|
||||
// Make sure we don't try to inline dead candidate nodes.
|
||||
if (!candidate.node->IsDead()) {
|
||||
Reduction r = inliner_.ReduceJSCall(candidate.node, candidate.function);
|
||||
if (r.Changed()) {
|
||||
cumulative_count_ += candidate.function->shared()->ast_node_count();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user