v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
simplified-operator-reducer.h
Go to the documentation of this file.
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_SIMPLIFIED_OPERATOR_REDUCER_H_
6#define V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_
7
11
12namespace v8 {
13namespace internal {
14
15// Forward declarations.
16class Factory;
17class Isolate;
18
19namespace compiler {
20
21// Forward declarations.
22class JSGraph;
23class MachineOperatorBuilder;
24class SimplifiedOperatorBuilder;
25
27 : public NON_EXPORTED_BASE(AdvancedReducer) {
28 public:
31 BranchSemantics branch_semantics);
35 delete;
36
37 const char* reducer_name() const override {
38 return "SimplifiedOperatorReducer";
39 }
40
41 Reduction Reduce(Node* node) final;
42
43 private:
44 Reduction Change(Node* node, const Operator* op, Node* a);
45 Reduction ReplaceBoolean(bool value);
46 Reduction ReplaceFloat64(double value);
47 Reduction ReplaceInt32(int32_t value);
48 Reduction ReplaceUint32(uint32_t value) {
49 return ReplaceInt32(base::bit_cast<int32_t>(value));
50 }
51 Reduction ReplaceNumber(double value);
52 Reduction ReplaceNumber(int32_t value);
53
54 Factory* factory() const;
55 TFGraph* graph() const;
56 MachineOperatorBuilder* machine() const;
58
59 JSGraph* jsgraph() const { return jsgraph_; }
60 JSHeapBroker* broker() const { return broker_; }
61
65};
66
67} // namespace compiler
68} // namespace internal
69} // namespace v8
70
71#endif // V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_
TFGraph * graph
JSGraph * jsgraph
SimplifiedOperatorBuilder * simplified
JSHeapBroker *const broker_
JSHeapBroker * broker
#define NON_EXPORTED_BASE(code)
#define V8_EXPORT_PRIVATE
Definition macros.h:460