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

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

Issue 1473073004: [compiler] merge binary-operator-reducer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: range fixes Created 5 years 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef V8_COMPILER_BINARY_OPERATOR_REDUCER_H_
6 #define V8_COMPILER_BINARY_OPERATOR_REDUCER_H_
7
8 #include "src/compiler/graph-reducer.h"
9
10 namespace v8 {
11 namespace internal {
12 namespace compiler {
13
14 // Forward declarations.
15 class CommonOperatorBuilder;
16 class Graph;
17 class MachineOperatorBuilder;
18 class Operator;
19
20
21 // Performs strength reduction on nodes that have common operators.
22 class BinaryOperatorReducer final : public AdvancedReducer {
23 public:
24 BinaryOperatorReducer(Editor* editor, Graph* graph,
25 CommonOperatorBuilder* common,
26 MachineOperatorBuilder* machine);
27 ~BinaryOperatorReducer() final {}
28
29 Reduction Reduce(Node* node) final;
30
31 private:
32 Reduction ReduceFloat52Mul(Node* node);
33 Reduction ReduceFloat52Div(Node* node);
34
35 Reduction Change(Node* node, Operator const* op, Node* a);
36
37 Graph* graph() const { return graph_; }
38 CommonOperatorBuilder* common() const { return common_; }
39 MachineOperatorBuilder* machine() const { return machine_; }
40 Node* dead() const { return dead_; }
41
42 Graph* const graph_;
43 CommonOperatorBuilder* const common_;
44 MachineOperatorBuilder* const machine_;
45 Node* const dead_;
46 };
47
48 } // namespace compiler
49 } // namespace internal
50 } // namespace v8
51
52 #endif // V8_COMPILER_BINARY_OPERATOR_REDUCER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698