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

Side by Side Diff: src/compiler/effect-control-linearizer.cc

Issue 1980383002: [turbofan] Kill type Guard nodes during effect/control linearization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: For "reason" wasm requires Begin/FinishRegion ATM. Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/compiler/effect-control-linearizer.h ('k') | src/compiler/instruction-selector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/effect-control-linearizer.h" 5 #include "src/compiler/effect-control-linearizer.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/access-builder.h" 8 #include "src/compiler/access-builder.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 // Schedule the call's IfSuccess node (if there is no exception use). 335 // Schedule the call's IfSuccess node (if there is no exception use).
336 TryScheduleCallIfSuccess(node, control); 336 TryScheduleCallIfSuccess(node, control);
337 } 337 }
338 } 338 }
339 } 339 }
340 340
341 bool EffectControlLinearizer::TryWireInStateEffect(Node* node, Node** effect, 341 bool EffectControlLinearizer::TryWireInStateEffect(Node* node, Node** effect,
342 Node** control) { 342 Node** control) {
343 ValueEffectControl state(nullptr, nullptr, nullptr); 343 ValueEffectControl state(nullptr, nullptr, nullptr);
344 switch (node->opcode()) { 344 switch (node->opcode()) {
345 case IrOpcode::kGuard:
346 state = LowerGuard(node, *effect, *control);
347 break;
345 case IrOpcode::kChangeBitToTagged: 348 case IrOpcode::kChangeBitToTagged:
346 state = LowerChangeBitToTagged(node, *effect, *control); 349 state = LowerChangeBitToTagged(node, *effect, *control);
347 break; 350 break;
348 case IrOpcode::kChangeInt31ToTaggedSigned: 351 case IrOpcode::kChangeInt31ToTaggedSigned:
349 state = LowerChangeInt31ToTaggedSigned(node, *effect, *control); 352 state = LowerChangeInt31ToTaggedSigned(node, *effect, *control);
350 break; 353 break;
351 case IrOpcode::kChangeInt32ToTagged: 354 case IrOpcode::kChangeInt32ToTagged:
352 state = LowerChangeInt32ToTagged(node, *effect, *control); 355 state = LowerChangeInt32ToTagged(node, *effect, *control);
353 break; 356 break;
354 case IrOpcode::kChangeUint32ToTagged: 357 case IrOpcode::kChangeUint32ToTagged:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 break; 398 break;
396 default: 399 default:
397 return false; 400 return false;
398 } 401 }
399 NodeProperties::ReplaceUses(node, state.value); 402 NodeProperties::ReplaceUses(node, state.value);
400 *effect = state.effect; 403 *effect = state.effect;
401 *control = state.control; 404 *control = state.control;
402 return true; 405 return true;
403 } 406 }
404 407
408 EffectControlLinearizer::ValueEffectControl EffectControlLinearizer::LowerGuard(
409 Node* node, Node* effect, Node* control) {
410 Node* value = node->InputAt(0);
411 return ValueEffectControl(value, effect, control);
412 }
413
405 EffectControlLinearizer::ValueEffectControl 414 EffectControlLinearizer::ValueEffectControl
406 EffectControlLinearizer::LowerChangeFloat64ToTagged(Node* node, Node* effect, 415 EffectControlLinearizer::LowerChangeFloat64ToTagged(Node* node, Node* effect,
407 Node* control) { 416 Node* control) {
408 Node* value = node->InputAt(0); 417 Node* value = node->InputAt(0);
409 418
410 Node* value32 = graph()->NewNode(machine()->RoundFloat64ToInt32(), value); 419 Node* value32 = graph()->NewNode(machine()->RoundFloat64ToInt32(), value);
411 Node* check_same = graph()->NewNode( 420 Node* check_same = graph()->NewNode(
412 machine()->Float64Equal(), value, 421 machine()->Float64Equal(), value,
413 graph()->NewNode(machine()->ChangeInt32ToFloat64(), value32)); 422 graph()->NewNode(machine()->ChangeInt32ToFloat64(), value32));
414 Node* branch_same = graph()->NewNode(common()->Branch(), check_same, control); 423 Node* branch_same = graph()->NewNode(common()->Branch(), check_same, control);
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 return jsgraph()->Int32Constant(Smi::kMaxValue); 964 return jsgraph()->Int32Constant(Smi::kMaxValue);
956 } 965 }
957 966
958 Node* EffectControlLinearizer::SmiShiftBitsConstant() { 967 Node* EffectControlLinearizer::SmiShiftBitsConstant() {
959 return jsgraph()->IntPtrConstant(kSmiShiftSize + kSmiTagSize); 968 return jsgraph()->IntPtrConstant(kSmiShiftSize + kSmiTagSize);
960 } 969 }
961 970
962 } // namespace compiler 971 } // namespace compiler
963 } // namespace internal 972 } // namespace internal
964 } // namespace v8 973 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/effect-control-linearizer.h ('k') | src/compiler/instruction-selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698