Commit ad55d888 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Generate a more serial effect chain

Put all loads on the effect chain. This removes freedom of the
scheduler, which might regress performance of the generated code
(probably negligible) and might improve performance of code generation.
It also prevents hard to diagnose bugs where the scheduler might
schedule loads too early such that we miss an update during a function
call or gc.

In order to make all updates and uses of the "current control" and
"current effect" more visible, this CL also introduces {SetEffect} and
{SetControl} methods, and uses {Effect} and {Control} more rigorously.

R=mstarzinger@chromium.org

Change-Id: I917ce1775345a1fadf6166022c8848e36e195c56
Reviewed-on: https://chromium-review.googlesource.com/1129235
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54679}
parent 4d921281
This diff is collapsed.
......@@ -270,8 +270,22 @@ class WasmGraphBuilder {
this->instance_node_ = instance_node;
}
Node* Control() { return *control_; }
Node* Effect() { return *effect_; }
Node* Control() {
DCHECK_NOT_NULL(*control_);
return *control_;
}
Node* Effect() {
DCHECK_NOT_NULL(*effect_);
return *effect_;
}
Node* SetControl(Node* node) {
*control_ = node;
return node;
}
Node* SetEffect(Node* node) {
*effect_ = node;
return node;
}
void set_control_ptr(Node** control) { this->control_ = control; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment