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

Side by Side Diff: src/code-stub-assembler.h

Issue 2658253002: [csa] Add IsIntPtrOrSmiConstantZero to detect and optimize constant zero values (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | src/code-stub-assembler.cc » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #ifndef V8_CODE_STUB_ASSEMBLER_H_ 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_
6 #define V8_CODE_STUB_ASSEMBLER_H_ 6 #define V8_CODE_STUB_ASSEMBLER_H_
7 7
8 #include <functional> 8 #include <functional>
9 9
10 #include "src/compiler/code-assembler.h" 10 #include "src/compiler/code-assembler.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 #define HEAP_CONSTANT_TEST(rootName, name) Node* Is##name(Node* value); 134 #define HEAP_CONSTANT_TEST(rootName, name) Node* Is##name(Node* value);
135 HEAP_CONSTANT_LIST(HEAP_CONSTANT_TEST) 135 HEAP_CONSTANT_LIST(HEAP_CONSTANT_TEST)
136 #undef HEAP_CONSTANT_TEST 136 #undef HEAP_CONSTANT_TEST
137 137
138 Node* HashSeed(); 138 Node* HashSeed();
139 Node* StaleRegisterConstant(); 139 Node* StaleRegisterConstant();
140 140
141 Node* IntPtrOrSmiConstant(int value, ParameterMode mode); 141 Node* IntPtrOrSmiConstant(int value, ParameterMode mode);
142 142
143 bool IsIntPtrOrSmiConstantZero(Node* test);
144
143 // Round the 32bits payload of the provided word up to the next power of two. 145 // Round the 32bits payload of the provided word up to the next power of two.
144 Node* IntPtrRoundUpToPowerOfTwo32(Node* value); 146 Node* IntPtrRoundUpToPowerOfTwo32(Node* value);
145 // Select the maximum of the two provided IntPtr values. 147 // Select the maximum of the two provided IntPtr values.
146 Node* IntPtrMax(Node* left, Node* right); 148 Node* IntPtrMax(Node* left, Node* right);
147 // Select the minimum of the two provided IntPtr values. 149 // Select the minimum of the two provided IntPtr values.
148 Node* IntPtrMin(Node* left, Node* right); 150 Node* IntPtrMin(Node* left, Node* right);
149 151
150 // Float64 operations. 152 // Float64 operations.
151 Node* Float64Ceil(Node* x); 153 Node* Float64Ceil(Node* x);
152 Node* Float64Floor(Node* x); 154 Node* Float64Floor(Node* x);
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 } 1306 }
1305 #else 1307 #else
1306 #define CSA_SLOW_ASSERT(csa, x) ((void)0) 1308 #define CSA_SLOW_ASSERT(csa, x) ((void)0)
1307 #endif 1309 #endif
1308 1310
1309 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 1311 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
1310 1312
1311 } // namespace internal 1313 } // namespace internal
1312 } // namespace v8 1314 } // namespace v8
1313 #endif // V8_CODE_STUB_ASSEMBLER_H_ 1315 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698