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

Side by Side Diff: src/crankshaft/hydrogen-instructions.h

Issue 1841513003: [crankshaft] Address the deoptimization loops of Math.floor, Math.round and Math.ceil. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Register constraints in Crankshaft are fun Created 4 years, 8 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/crankshaft/hydrogen-instructions.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2492 protected: 2492 protected:
2493 bool DataEquals(HValue* other) override { 2493 bool DataEquals(HValue* other) override {
2494 HUnaryMathOperation* b = HUnaryMathOperation::cast(other); 2494 HUnaryMathOperation* b = HUnaryMathOperation::cast(other);
2495 return op_ == b->op(); 2495 return op_ == b->op();
2496 } 2496 }
2497 2497
2498 private: 2498 private:
2499 // Indicates if we support a double (and int32) output for Math.floor and 2499 // Indicates if we support a double (and int32) output for Math.floor and
2500 // Math.round. 2500 // Math.round.
2501 bool SupportsFlexibleFloorAndRound() const { 2501 bool SupportsFlexibleFloorAndRound() const {
2502 #ifdef V8_TARGET_ARCH_ARM64 2502 #if V8_TARGET_ARCH_ARM64
2503 // TODO(rmcilroy): Re-enable this for Arm64 once http://crbug.com/476477 is 2503 return true;
2504 // fixed. 2504 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64
2505 return false; 2505 return CpuFeatures::IsSupported(SSE4_1);
2506 #else 2506 #else
2507 return false; 2507 return false;
2508 #endif 2508 #endif
2509 } 2509 }
2510 HUnaryMathOperation(HValue* context, HValue* value, BuiltinFunctionId op) 2510 HUnaryMathOperation(HValue* context, HValue* value, BuiltinFunctionId op)
2511 : HTemplateInstruction<2>(HType::TaggedNumber()), op_(op) { 2511 : HTemplateInstruction<2>(HType::TaggedNumber()), op_(op) {
2512 SetOperandAt(0, context); 2512 SetOperandAt(0, context);
2513 SetOperandAt(1, value); 2513 SetOperandAt(1, value);
2514 switch (op) { 2514 switch (op) {
2515 case kMathFloor: 2515 case kMathFloor:
(...skipping 4749 matching lines...) Expand 10 before | Expand all | Expand 10 after
7265 7265
7266 7266
7267 7267
7268 #undef DECLARE_INSTRUCTION 7268 #undef DECLARE_INSTRUCTION
7269 #undef DECLARE_CONCRETE_INSTRUCTION 7269 #undef DECLARE_CONCRETE_INSTRUCTION
7270 7270
7271 } // namespace internal 7271 } // namespace internal
7272 } // namespace v8 7272 } // namespace v8
7273 7273
7274 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 7274 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698