Commit f496f80f authored by jarin's avatar jarin Committed by Commit bot

Revert of [compiler] Load elimination now traverses CheckTaggedPointer....

Revert of [compiler] Load elimination now traverses CheckTaggedPointer. (patchset #1 id:1 of https://codereview.chromium.org/2104893002/ )

Reason for revert:
Clusterfuzz breakage (https://bugs.chromium.org/p/chromium/issues/detail?id=624756)

Original issue's description:
> [compiler] Load elimination now traverses CheckTaggedPointer.
>
> It also dereferences the inputs of StoreField, if those were
> CheckTaggedPointers. Tested manually.
>
> BUG=
>
> Committed: https://crrev.com/f416886358c0aeaa5b4d1e83d9c7d6bb8b0e7f2f
> Cr-Commit-Position: refs/heads/master@{#37330}

TBR=bmeurer@chromium.org,bgeron@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review-Url: https://codereview.chromium.org/2113623002
Cr-Commit-Position: refs/heads/master@{#37438}
parent aca3716a
......@@ -25,19 +25,6 @@ Reduction LoadElimination::Reduce(Node* node) {
return NoChange();
}
namespace {
// If {node} is a CheckTaggedPointer, follow its input until {node} is no
// longer a CheckTaggedPointer.
Node* NormalizeCheckTaggedPointer(Node* node) {
while (node->opcode() == IrOpcode::kCheckTaggedPointer) {
node = NodeProperties::GetValueInput(node, 0);
}
return node;
}
} // namespace
Reduction LoadElimination::ReduceLoadField(Node* node) {
DCHECK_EQ(IrOpcode::kLoadField, node->opcode());
FieldAccess const access = FieldAccessOf(node->op());
......@@ -57,9 +44,7 @@ Reduction LoadElimination::ReduceLoadField(Node* node) {
}
case IrOpcode::kStoreField: {
if (access == FieldAccessOf(effect->op())) {
Node* value_input = NormalizeCheckTaggedPointer(
NodeProperties::GetValueInput(effect, 0));
if (object == value_input) {
if (object == NodeProperties::GetValueInput(effect, 0)) {
Node* const value = NodeProperties::GetValueInput(effect, 1);
Type* value_type = NodeProperties::GetType(value);
Type* node_type = NodeProperties::GetType(node);
......@@ -88,8 +73,7 @@ Reduction LoadElimination::ReduceLoadField(Node* node) {
// These can never interfere with field loads.
break;
}
case IrOpcode::kFinishRegion:
case IrOpcode::kCheckTaggedPointer: {
case IrOpcode::kFinishRegion: {
// "Look through" FinishRegion nodes to make LoadElimination capable
// of looking into atomic regions.
if (object == effect) object = NodeProperties::GetValueInput(effect, 0);
......
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