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

Side by Side Diff: src/compiler/machine-operator-reducer.h

Issue 697663003: [turbofan] Also optimize unsigned division by constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Slight improvement Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | src/compiler/machine-operator-reducer.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 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 #ifndef V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_ 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_
6 #define V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_ 6 #define V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_
7 7
8 #include "src/compiler/graph-reducer.h" 8 #include "src/compiler/graph-reducer.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 10
(...skipping 23 matching lines...) Expand all
34 Node* Uint32Constant(uint32_t value) { 34 Node* Uint32Constant(uint32_t value) {
35 return Int32Constant(bit_cast<uint32_t>(value)); 35 return Int32Constant(bit_cast<uint32_t>(value));
36 } 36 }
37 Node* Word32And(Node* lhs, uint32_t rhs); 37 Node* Word32And(Node* lhs, uint32_t rhs);
38 Node* Word32Sar(Node* lhs, uint32_t rhs); 38 Node* Word32Sar(Node* lhs, uint32_t rhs);
39 Node* Word32Shr(Node* lhs, uint32_t rhs); 39 Node* Word32Shr(Node* lhs, uint32_t rhs);
40 Node* Word32Equal(Node* lhs, Node* rhs); 40 Node* Word32Equal(Node* lhs, Node* rhs);
41 Node* Int32Add(Node* lhs, Node* rhs); 41 Node* Int32Add(Node* lhs, Node* rhs);
42 Node* Int32Sub(Node* lhs, Node* rhs); 42 Node* Int32Sub(Node* lhs, Node* rhs);
43 Node* Int32Mul(Node* lhs, Node* rhs); 43 Node* Int32Mul(Node* lhs, Node* rhs);
44 44 Node* Int32Div(Node* dividend, int32_t divisor);
45 Node* TruncatingDiv(Node* dividend, int32_t divisor); 45 Node* Uint32Div(Node* dividend, uint32_t divisor);
46 46
47 Reduction ReplaceBool(bool value) { return ReplaceInt32(value ? 1 : 0); } 47 Reduction ReplaceBool(bool value) { return ReplaceInt32(value ? 1 : 0); }
48 Reduction ReplaceFloat32(volatile float value) { 48 Reduction ReplaceFloat32(volatile float value) {
49 return Replace(Float32Constant(value)); 49 return Replace(Float32Constant(value));
50 } 50 }
51 Reduction ReplaceFloat64(volatile double value) { 51 Reduction ReplaceFloat64(volatile double value) {
52 return Replace(Float64Constant(value)); 52 return Replace(Float64Constant(value));
53 } 53 }
54 Reduction ReplaceInt32(int32_t value) { 54 Reduction ReplaceInt32(int32_t value) {
55 return Replace(Int32Constant(value)); 55 return Replace(Int32Constant(value));
(...skipping 17 matching lines...) Expand all
73 MachineOperatorBuilder* machine() const; 73 MachineOperatorBuilder* machine() const;
74 74
75 JSGraph* jsgraph_; 75 JSGraph* jsgraph_;
76 }; 76 };
77 77
78 } // namespace compiler 78 } // namespace compiler
79 } // namespace internal 79 } // namespace internal
80 } // namespace v8 80 } // namespace v8
81 81
82 #endif // V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_ 82 #endif // V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_
OLDNEW
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | src/compiler/machine-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698