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

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

Issue 2115513002: [turbofan] Introduce CheckIf simplified operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/js-call-reducer.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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 break; 427 break;
428 case IrOpcode::kTruncateTaggedToFloat64: 428 case IrOpcode::kTruncateTaggedToFloat64:
429 state = LowerTruncateTaggedToFloat64(node, *effect, *control); 429 state = LowerTruncateTaggedToFloat64(node, *effect, *control);
430 break; 430 break;
431 case IrOpcode::kCheckBounds: 431 case IrOpcode::kCheckBounds:
432 state = LowerCheckBounds(node, frame_state, *effect, *control); 432 state = LowerCheckBounds(node, frame_state, *effect, *control);
433 break; 433 break;
434 case IrOpcode::kCheckNumber: 434 case IrOpcode::kCheckNumber:
435 state = LowerCheckNumber(node, frame_state, *effect, *control); 435 state = LowerCheckNumber(node, frame_state, *effect, *control);
436 break; 436 break;
437 case IrOpcode::kCheckIf:
438 state = LowerCheckIf(node, frame_state, *effect, *control);
439 break;
437 case IrOpcode::kCheckTaggedPointer: 440 case IrOpcode::kCheckTaggedPointer:
438 state = LowerCheckTaggedPointer(node, frame_state, *effect, *control); 441 state = LowerCheckTaggedPointer(node, frame_state, *effect, *control);
439 break; 442 break;
440 case IrOpcode::kCheckTaggedSigned: 443 case IrOpcode::kCheckTaggedSigned:
441 state = LowerCheckTaggedSigned(node, frame_state, *effect, *control); 444 state = LowerCheckTaggedSigned(node, frame_state, *effect, *control);
442 break; 445 break;
443 case IrOpcode::kCheckedInt32Add: 446 case IrOpcode::kCheckedInt32Add:
444 state = LowerCheckedInt32Add(node, frame_state, *effect, *control); 447 state = LowerCheckedInt32Add(node, frame_state, *effect, *control);
445 break; 448 break;
446 case IrOpcode::kCheckedInt32Sub: 449 case IrOpcode::kCheckedInt32Sub:
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 control = graph()->NewNode(common()->Merge(2), if_true0, if_false0); 832 control = graph()->NewNode(common()->Merge(2), if_true0, if_false0);
830 effect = graph()->NewNode(common()->EffectPhi(2), etrue0, efalse0, control); 833 effect = graph()->NewNode(common()->EffectPhi(2), etrue0, efalse0, control);
831 834
832 // Make sure the lowered node does not appear in any use lists. 835 // Make sure the lowered node does not appear in any use lists.
833 node->TrimInputCount(0); 836 node->TrimInputCount(0);
834 837
835 return ValueEffectControl(value, effect, control); 838 return ValueEffectControl(value, effect, control);
836 } 839 }
837 840
838 EffectControlLinearizer::ValueEffectControl 841 EffectControlLinearizer::ValueEffectControl
842 EffectControlLinearizer::LowerCheckIf(Node* node, Node* frame_state,
843 Node* effect, Node* control) {
844 Node* value = node->InputAt(0);
845
846 control = effect = graph()->NewNode(common()->DeoptimizeUnless(), value,
847 frame_state, effect, control);
848
849 // Make sure the lowered node does not appear in any use lists.
850 node->TrimInputCount(0);
851
852 return ValueEffectControl(value, effect, control);
853 }
854
855 EffectControlLinearizer::ValueEffectControl
839 EffectControlLinearizer::LowerCheckTaggedPointer(Node* node, Node* frame_state, 856 EffectControlLinearizer::LowerCheckTaggedPointer(Node* node, Node* frame_state,
840 Node* effect, Node* control) { 857 Node* effect, Node* control) {
841 Node* value = node->InputAt(0); 858 Node* value = node->InputAt(0);
842 859
843 Node* check = ObjectIsSmi(value); 860 Node* check = ObjectIsSmi(value);
844 control = effect = graph()->NewNode(common()->DeoptimizeIf(), check, 861 control = effect = graph()->NewNode(common()->DeoptimizeIf(), check,
845 frame_state, effect, control); 862 frame_state, effect, control);
846 863
847 // Make sure the lowered node does not appear in any use lists. 864 // Make sure the lowered node does not appear in any use lists.
848 node->TrimInputCount(0); 865 node->TrimInputCount(0);
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 isolate(), graph()->zone(), callable.descriptor(), 0, flags, 1704 isolate(), graph()->zone(), callable.descriptor(), 0, flags,
1688 Operator::kNoThrow); 1705 Operator::kNoThrow);
1689 to_number_operator_.set(common()->Call(desc)); 1706 to_number_operator_.set(common()->Call(desc));
1690 } 1707 }
1691 return to_number_operator_.get(); 1708 return to_number_operator_.get();
1692 } 1709 }
1693 1710
1694 } // namespace compiler 1711 } // namespace compiler
1695 } // namespace internal 1712 } // namespace internal
1696 } // namespace v8 1713 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/effect-control-linearizer.h ('k') | src/compiler/js-call-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698