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

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

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/simplified-operator.cc ('k') | src/compiler/simplified-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_SIMPLIFIED_OPERATOR_REDUCER_H_ 5 #ifndef V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_
6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ 6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_
7 7
8 #include "src/compiler/graph-reducer.h" 8 #include "src/compiler/graph-reducer.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12
13 // Forward declarations.
14 class Factory;
15 class Isolate;
16
12 namespace compiler { 17 namespace compiler {
13 18
14 // Forward declarations. 19 // Forward declarations.
15 class JSGraph; 20 class JSGraph;
16 class MachineOperatorBuilder; 21 class MachineOperatorBuilder;
17 class SimplifiedOperatorBuilder; 22 class SimplifiedOperatorBuilder;
18 23
19 class SimplifiedOperatorReducer final : public AdvancedReducer { 24 class SimplifiedOperatorReducer final : public AdvancedReducer {
20 public: 25 public:
21 SimplifiedOperatorReducer(Editor* editor, JSGraph* jsgraph); 26 SimplifiedOperatorReducer(Editor* editor, JSGraph* jsgraph);
22 ~SimplifiedOperatorReducer() final; 27 ~SimplifiedOperatorReducer() final;
23 28
24 Reduction Reduce(Node* node) final; 29 Reduction Reduce(Node* node) final;
25 30
26 private: 31 private:
27 Reduction ReduceReferenceEqual(Node* node); 32 Reduction ReduceReferenceEqual(Node* node);
28 33
29 Reduction Change(Node* node, const Operator* op, Node* a); 34 Reduction Change(Node* node, const Operator* op, Node* a);
30 Reduction ReplaceBoolean(bool value); 35 Reduction ReplaceBoolean(bool value);
31 Reduction ReplaceFloat64(double value); 36 Reduction ReplaceFloat64(double value);
32 Reduction ReplaceInt32(int32_t value); 37 Reduction ReplaceInt32(int32_t value);
33 Reduction ReplaceUint32(uint32_t value) { 38 Reduction ReplaceUint32(uint32_t value) {
34 return ReplaceInt32(bit_cast<int32_t>(value)); 39 return ReplaceInt32(bit_cast<int32_t>(value));
35 } 40 }
36 Reduction ReplaceNumber(double value); 41 Reduction ReplaceNumber(double value);
37 Reduction ReplaceNumber(int32_t value); 42 Reduction ReplaceNumber(int32_t value);
38 43
44 Factory* factory() const;
39 Graph* graph() const; 45 Graph* graph() const;
46 Isolate* isolate() const;
40 JSGraph* jsgraph() const { return jsgraph_; } 47 JSGraph* jsgraph() const { return jsgraph_; }
41 MachineOperatorBuilder* machine() const; 48 MachineOperatorBuilder* machine() const;
42 SimplifiedOperatorBuilder* simplified() const; 49 SimplifiedOperatorBuilder* simplified() const;
43 50
44 JSGraph* const jsgraph_; 51 JSGraph* const jsgraph_;
45 52
46 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorReducer); 53 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorReducer);
47 }; 54 };
48 55
49 } // namespace compiler 56 } // namespace compiler
50 } // namespace internal 57 } // namespace internal
51 } // namespace v8 58 } // namespace v8
52 59
53 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ 60 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | src/compiler/simplified-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698