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

Unified Diff: src/compiler/load-elimination.h

Issue 2120253002: [turbofan] Initial version of the new LoadElimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@TurboFan_StackCheck_NoWrite
Patch Set: Fix DCHECK. Check types on substitution. 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/load-elimination.h
diff --git a/src/compiler/load-elimination.h b/src/compiler/load-elimination.h
index 4a1323b279491fb2423cab77a1ea49e5eabe8c9a..5626271db194035627cb8ed725d423229d0025ef 100644
--- a/src/compiler/load-elimination.h
+++ b/src/compiler/load-elimination.h
@@ -1,36 +1,37 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
+// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_COMPILER_LOAD_ELIMINATION_H_
#define V8_COMPILER_LOAD_ELIMINATION_H_
-#include "src/compiler/graph-reducer.h"
-
namespace v8 {
namespace internal {
+
+// Forward declarations.
+class Zone;
+
namespace compiler {
+// Forward declarations.
class Graph;
-class SimplifiedOperatorBuilder;
+class JSGraph;
-class LoadElimination final : public AdvancedReducer {
+// Eliminates redundant loads via scalar replacement of aggregates.
+class LoadElimination final {
public:
- explicit LoadElimination(Editor* editor, Graph* graph,
- SimplifiedOperatorBuilder* simplified)
- : AdvancedReducer(editor), graph_(graph), simplified_(simplified) {}
- ~LoadElimination() final;
+ LoadElimination(JSGraph* jsgraph, Zone* zone)
+ : jsgraph_(jsgraph), zone_(zone) {}
- Reduction Reduce(Node* node) final;
+ void Run();
private:
- SimplifiedOperatorBuilder* simplified() const { return simplified_; }
- Graph* graph() const { return graph_; }
-
- Reduction ReduceLoadField(Node* node);
+ Graph* graph() const;
+ JSGraph* jsgraph() const { return jsgraph_; }
+ Zone* zone() const { return zone_; }
- Graph* const graph_;
- SimplifiedOperatorBuilder* const simplified_;
+ JSGraph* const jsgraph_;
+ Zone* const zone_;
};
} // namespace compiler
« no previous file with comments | « no previous file | src/compiler/load-elimination.cc » ('j') | test/unittests/compiler/load-elimination-unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698