Commit 100850c9 authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[TurboProp] Inline common functions to address a regression

Inlines UpdateEffectControlWith and AddClonedNode in GraphAssembler to address
a regression in some benchmarks caused by Add the ability for GraphAssembler
to update basic blocks.

BUG=chromium:1018661,v8:9684

Change-Id: I05513c13305465310552448192e0474f5aaa4a20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1886917
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64615}
parent 2cc0eed9
...@@ -692,15 +692,6 @@ void GraphAssembler::ConnectUnreachableToEnd() { ...@@ -692,15 +692,6 @@ void GraphAssembler::ConnectUnreachableToEnd() {
} }
} }
void GraphAssembler::UpdateEffectControlWith(Node* node) {
if (node->op()->EffectOutputCount() > 0) {
current_effect_ = node;
}
if (node->op()->ControlOutputCount() > 0) {
current_control_ = node;
}
}
Node* GraphAssembler::AddClonedNode(Node* node) { Node* GraphAssembler::AddClonedNode(Node* node) {
DCHECK(node->op()->HasProperty(Operator::kPure)); DCHECK(node->op()->HasProperty(Operator::kPure));
if (block_updater_) { if (block_updater_) {
......
...@@ -301,7 +301,14 @@ class GraphAssembler { ...@@ -301,7 +301,14 @@ class GraphAssembler {
Vars...); Vars...);
// Updates current effect and control based on outputs of {node}. // Updates current effect and control based on outputs of {node}.
void UpdateEffectControlWith(Node* node); V8_INLINE void UpdateEffectControlWith(Node* node) {
if (node->op()->EffectOutputCount() > 0) {
current_effect_ = node;
}
if (node->op()->ControlOutputCount() > 0) {
current_control_ = node;
}
}
// Adds {node} to the current position and updates assembler's current effect // Adds {node} to the current position and updates assembler's current effect
// and control. // and control.
...@@ -335,7 +342,7 @@ class GraphAssembler { ...@@ -335,7 +342,7 @@ class GraphAssembler {
void GotoIfBasicBlock(BasicBlock* block, Node* branch, void GotoIfBasicBlock(BasicBlock* block, Node* branch,
IrOpcode::Value goto_if); IrOpcode::Value goto_if);
Node* AddClonedNode(Node* node); V8_INLINE Node* AddClonedNode(Node* node);
Operator const* ToNumberOperator(); Operator const* ToNumberOperator();
......
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