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

Unified Diff: src/compiler/frame-elider.cc

Issue 1775323002: [turbofan] Frame elision for code stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/frame-elider.cc
diff --git a/src/compiler/frame-elider.cc b/src/compiler/frame-elider.cc
index 172a724dd8a744dce535f47f96ec9f1342d3d4d1..7db6b61026809c3f1a184d6d23198c01f49597b8 100644
--- a/src/compiler/frame-elider.cc
+++ b/src/compiler/frame-elider.cc
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/base/adapters.h"
#include "src/compiler/frame-elider.h"
+#include "src/base/adapters.h"
+#include "src/compiler/linkage.h"
namespace v8 {
namespace internal {
@@ -11,8 +12,12 @@ namespace compiler {
FrameElider::FrameElider(InstructionSequence* code) : code_(code) {}
-void FrameElider::Run() {
- MarkBlocks();
+void FrameElider::Run(const CallDescriptor* descriptor) {
+ if (descriptor != nullptr && descriptor->RequiresFrameAsIncoming()) {
+ instruction_blocks()[0]->mark_needs_frame();
+ } else {
+ MarkBlocks();
+ }
PropagateMarks();
MarkDeConstruction();
}
@@ -23,7 +28,8 @@ void FrameElider::MarkBlocks() {
if (block->needs_frame()) continue;
for (int i = block->code_start(); i < block->code_end(); ++i) {
if (InstructionAt(i)->IsCall() ||
- InstructionAt(i)->opcode() == ArchOpcode::kArchDeoptimize) {
+ InstructionAt(i)->opcode() == ArchOpcode::kArchDeoptimize ||
+ InstructionAt(i)->opcode() == ArchOpcode::kArchStackPointer) {
block->mark_needs_frame();
break;
}

Powered by Google App Engine
This is Rietveld 408576698