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

Unified Diff: src/compiler/js-graph.cc

Issue 2006353003: [turbofan] Avoid unnecessary copying of nodes during inlining. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't use one EmptyFrameState cross functions, that gets mutated during inlining. Created 4 years, 7 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 | « src/compiler/js-graph.h ('k') | src/compiler/js-inlining.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-graph.cc
diff --git a/src/compiler/js-graph.cc b/src/compiler/js-graph.cc
index 229169f792432fbc52a388ca3e48aed7bc18153e..4efe3a31b03cfd1f2dfece180e74ff027e2ab779 100644
--- a/src/compiler/js-graph.cc
+++ b/src/compiler/js-graph.cc
@@ -222,17 +222,19 @@ Node* JSGraph::ExternalConstant(Runtime::FunctionId function_id) {
Node* JSGraph::EmptyFrameState() {
Node* empty_frame_state = cached_nodes_[kEmptyFrameState];
if (!empty_frame_state || empty_frame_state->IsDead()) {
- Node* state_values = graph()->NewNode(common()->StateValues(0));
empty_frame_state = graph()->NewNode(
common()->FrameState(BailoutId::None(),
OutputFrameStateCombine::Ignore(), nullptr),
- state_values, state_values, state_values, NoContextConstant(),
- UndefinedConstant(), graph()->start());
+ EmptyStateValues(), EmptyStateValues(), EmptyStateValues(),
+ NoContextConstant(), UndefinedConstant(), graph()->start());
cached_nodes_[kEmptyFrameState] = empty_frame_state;
}
return empty_frame_state;
}
+Node* JSGraph::EmptyStateValues() {
+ return CACHED(kEmptyStateValues, graph()->NewNode(common()->StateValues(0)));
+}
Node* JSGraph::Dead() {
return CACHED(kDead, graph()->NewNode(common()->Dead()));
« no previous file with comments | « src/compiler/js-graph.h ('k') | src/compiler/js-inlining.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698