Chromium Code Reviews

Side by Side Diff: src/compiler/memory-optimizer.h

Issue 2602413002: [turbofan] Use graph assembler for memory optimizer. (Closed)
Patch Set: Refactor Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « src/compiler/graph-assembler.cc ('k') | src/compiler/memory-optimizer.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_MEMORY_OPTIMIZER_H_ 5 #ifndef V8_COMPILER_MEMORY_OPTIMIZER_H_
6 #define V8_COMPILER_MEMORY_OPTIMIZER_H_ 6 #define V8_COMPILER_MEMORY_OPTIMIZER_H_
7 7
8 #include "src/compiler/graph-assembler.h"
8 #include "src/zone/zone-containers.h" 9 #include "src/zone/zone-containers.h"
9 10
10 namespace v8 { 11 namespace v8 {
11 namespace internal { 12 namespace internal {
12 namespace compiler { 13 namespace compiler {
13 14
14 // Forward declarations. 15 // Forward declarations.
15 class CommonOperatorBuilder; 16 class CommonOperatorBuilder;
16 struct ElementAccess; 17 struct ElementAccess;
17 class Graph; 18 class Graph;
(...skipping 106 matching lines...)
124 void EnqueueUses(Node*, AllocationState const*); 125 void EnqueueUses(Node*, AllocationState const*);
125 void EnqueueUse(Node*, int, AllocationState const*); 126 void EnqueueUse(Node*, int, AllocationState const*);
126 127
127 AllocationState const* empty_state() const { return empty_state_; } 128 AllocationState const* empty_state() const { return empty_state_; }
128 Graph* graph() const; 129 Graph* graph() const;
129 Isolate* isolate() const; 130 Isolate* isolate() const;
130 JSGraph* jsgraph() const { return jsgraph_; } 131 JSGraph* jsgraph() const { return jsgraph_; }
131 CommonOperatorBuilder* common() const; 132 CommonOperatorBuilder* common() const;
132 MachineOperatorBuilder* machine() const; 133 MachineOperatorBuilder* machine() const;
133 Zone* zone() const { return zone_; } 134 Zone* zone() const { return zone_; }
135 GraphAssembler* gasm() { return &graph_assembler_; }
134 136
135 SetOncePointer<const Operator> allocate_operator_; 137 SetOncePointer<const Operator> allocate_operator_;
136 JSGraph* const jsgraph_; 138 JSGraph* const jsgraph_;
137 AllocationState const* const empty_state_; 139 AllocationState const* const empty_state_;
138 ZoneMap<NodeId, AllocationStates> pending_; 140 ZoneMap<NodeId, AllocationStates> pending_;
139 ZoneQueue<Token> tokens_; 141 ZoneQueue<Token> tokens_;
140 Zone* const zone_; 142 Zone* const zone_;
143 GraphAssembler graph_assembler_;
141 144
142 DISALLOW_IMPLICIT_CONSTRUCTORS(MemoryOptimizer); 145 DISALLOW_IMPLICIT_CONSTRUCTORS(MemoryOptimizer);
143 }; 146 };
144 147
145 } // namespace compiler 148 } // namespace compiler
146 } // namespace internal 149 } // namespace internal
147 } // namespace v8 150 } // namespace v8
148 151
149 #endif // V8_COMPILER_MEMORY_OPTIMIZER_H_ 152 #endif // V8_COMPILER_MEMORY_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/compiler/graph-assembler.cc ('k') | src/compiler/memory-optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine