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

Unified Diff: src/compiler/node-properties.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/node-properties.cc
diff --git a/src/compiler/node-properties.cc b/src/compiler/node-properties.cc
index 1575310a7f3a26517fba1289cbdde6263c783159..4ed40b87ff07233ed5e2a9e910c33d733fb349e1 100644
--- a/src/compiler/node-properties.cc
+++ b/src/compiler/node-properties.cc
@@ -152,14 +152,20 @@ void NodeProperties::RemoveNonValueInputs(Node* node) {
// static
void NodeProperties::ReplaceWithValue(Node* node, Node* value, Node* effect) {
- DCHECK(node->op()->ControlOutputCount() == 0);
+ // TODO(mstarzinger): Enable once call-sites are in the right order.
+ // DCHECK(node->op()->HasProperty(Operator::kNoThrow));
titzer 2015/02/17 10:32:52 Not a fan of these DCHECKS here. Node is the old
Michael Starzinger 2015/02/17 10:58:29 Done. Dropped it.
if (!effect && node->op()->EffectInputCount() > 0) {
effect = NodeProperties::GetEffectInput(node);
}
- // Requires distinguishing between value and effect edges.
+ // Requires distinguishing between value, effect and control edges.
for (Edge edge : node->use_edges()) {
- if (IsEffectEdge(edge)) {
+ if (IsControlEdge(edge)) {
+ DCHECK_EQ(IrOpcode::kIfSuccess, edge.from()->opcode());
+ Node* control = NodeProperties::GetControlInput(node);
+ edge.from()->ReplaceUses(control);
+ edge.UpdateTo(NULL);
+ } else if (IsEffectEdge(edge)) {
DCHECK_NOT_NULL(effect);
edge.UpdateTo(effect);
} else {

Powered by Google App Engine
This is Rietveld 408576698