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

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: REBASE. 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
« no previous file with comments | « no previous file | src/compiler/load-elimination.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/load-elimination.h
diff --git a/src/compiler/load-elimination.h b/src/compiler/load-elimination.h
index 4a1323b279491fb2423cab77a1ea49e5eabe8c9a..5b926488d5a1c4645fcb452c115d1613572c35c6 100644
--- a/src/compiler/load-elimination.h
+++ b/src/compiler/load-elimination.h
@@ -1,36 +1,34 @@
-// 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 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(Graph* graph, Zone* zone) : graph_(graph), zone_(zone) {}
- Reduction Reduce(Node* node) final;
+ void Run();
private:
- SimplifiedOperatorBuilder* simplified() const { return simplified_; }
Graph* graph() const { return graph_; }
-
- Reduction ReduceLoadField(Node* node);
+ Zone* zone() const { return zone_; }
Graph* const graph_;
- SimplifiedOperatorBuilder* const simplified_;
+ Zone* const zone_;
};
} // namespace compiler
« no previous file with comments | « no previous file | src/compiler/load-elimination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698