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

Side by Side Diff: src/compiler/common-operator.cc

Issue 1399423002: [turbofan] Introduce node regions for protection from scheduling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move RelaxControls Created 5 years, 2 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/common-operator.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 6
7 #include "src/assembler.h" 7 #include "src/assembler.h"
8 #include "src/base/lazy-instance.h" 8 #include "src/base/lazy-instance.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 #define CACHED_OP_LIST(V) \ 118 #define CACHED_OP_LIST(V) \
119 V(Dead, Operator::kFoldable, 0, 0, 0, 1, 1, 1) \ 119 V(Dead, Operator::kFoldable, 0, 0, 0, 1, 1, 1) \
120 V(IfTrue, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ 120 V(IfTrue, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \
121 V(IfFalse, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ 121 V(IfFalse, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \
122 V(IfSuccess, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ 122 V(IfSuccess, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \
123 V(IfDefault, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ 123 V(IfDefault, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \
124 V(Throw, Operator::kKontrol, 1, 1, 1, 0, 0, 1) \ 124 V(Throw, Operator::kKontrol, 1, 1, 1, 0, 0, 1) \
125 V(Deoptimize, Operator::kNoThrow, 1, 1, 1, 0, 0, 1) \ 125 V(Deoptimize, Operator::kNoThrow, 1, 1, 1, 0, 0, 1) \
126 V(Terminate, Operator::kKontrol, 0, 1, 1, 0, 0, 1) \ 126 V(Terminate, Operator::kKontrol, 0, 1, 1, 0, 0, 1) \
127 V(OsrNormalEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) \ 127 V(OsrNormalEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) \
128 V(OsrLoopEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) 128 V(OsrLoopEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) \
129 V(BeginRegion, Operator::kNoThrow, 0, 1, 0, 0, 1, 0) \
130 V(FinishRegion, Operator::kNoThrow, 1, 1, 0, 1, 1, 0)
129 131
130 132
131 #define CACHED_RETURN_LIST(V) \ 133 #define CACHED_RETURN_LIST(V) \
132 V(1) \ 134 V(1) \
133 V(2) \ 135 V(2) \
134 V(3) 136 V(3)
135 137
136 138
137 #define CACHED_END_LIST(V) \ 139 #define CACHED_END_LIST(V) \
138 V(1) \ 140 V(1) \
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 673
672 const Operator* CommonOperatorBuilder::EffectSet(int arguments) { 674 const Operator* CommonOperatorBuilder::EffectSet(int arguments) {
673 DCHECK(arguments > 1); // Disallow empty/singleton sets. 675 DCHECK(arguments > 1); // Disallow empty/singleton sets.
674 return new (zone()) Operator( // -- 676 return new (zone()) Operator( // --
675 IrOpcode::kEffectSet, Operator::kPure, // opcode 677 IrOpcode::kEffectSet, Operator::kPure, // opcode
676 "EffectSet", // name 678 "EffectSet", // name
677 0, arguments, 0, 0, 1, 0); // counts 679 0, arguments, 0, 0, 1, 0); // counts
678 } 680 }
679 681
680 682
681 const Operator* CommonOperatorBuilder::ValueEffect(int arguments) {
682 DCHECK(arguments > 0); // Disallow empty value effects.
683 return new (zone()) Operator( // --
684 IrOpcode::kValueEffect, Operator::kPure, // opcode
685 "ValueEffect", // name
686 arguments, 0, 0, 0, 1, 0); // counts
687 }
688
689
690 const Operator* CommonOperatorBuilder::Finish(int arguments) {
691 DCHECK(arguments > 0); // Disallow empty finishes.
692 return new (zone()) Operator( // --
693 IrOpcode::kFinish, Operator::kPure, // opcode
694 "Finish", // name
695 1, arguments, 0, 1, 0, 0); // counts
696 }
697
698
699 const Operator* CommonOperatorBuilder::StateValues(int arguments) { 683 const Operator* CommonOperatorBuilder::StateValues(int arguments) {
700 switch (arguments) { 684 switch (arguments) {
701 #define CACHED_STATE_VALUES(arguments) \ 685 #define CACHED_STATE_VALUES(arguments) \
702 case arguments: \ 686 case arguments: \
703 return &cache_.kStateValues##arguments##Operator; 687 return &cache_.kStateValues##arguments##Operator;
704 CACHED_STATE_VALUES_LIST(CACHED_STATE_VALUES) 688 CACHED_STATE_VALUES_LIST(CACHED_STATE_VALUES)
705 #undef CACHED_STATE_VALUES 689 #undef CACHED_STATE_VALUES
706 default: 690 default:
707 break; 691 break;
708 } 692 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 Handle<SharedFunctionInfo> shared_info, 801 Handle<SharedFunctionInfo> shared_info,
818 ContextCallingMode context_calling_mode) { 802 ContextCallingMode context_calling_mode) {
819 return new (zone()->New(sizeof(FrameStateFunctionInfo))) 803 return new (zone()->New(sizeof(FrameStateFunctionInfo)))
820 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info, 804 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info,
821 context_calling_mode); 805 context_calling_mode);
822 } 806 }
823 807
824 } // namespace compiler 808 } // namespace compiler
825 } // namespace internal 809 } // namespace internal
826 } // namespace v8 810 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/common-operator.h ('k') | src/compiler/instruction-selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698