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

Unified Diff: src/compiler/pipeline.cc

Issue 1642823002: [turbofan] Jump threading awareness of frame elision. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index 3fe6582cb1ac3a4df150122c1a7cc516ce38e761..a1779a512211e84dde727bb641bb42e1ba31caed 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -982,9 +982,10 @@ struct FrameElisionPhase {
struct JumpThreadingPhase {
static const char* phase_name() { return "jump threading"; }
- void Run(PipelineData* data, Zone* temp_zone) {
+ void Run(PipelineData* data, Zone* temp_zone, bool frame_at_start) {
ZoneVector<RpoNumber> result(temp_zone);
- if (JumpThreading::ComputeForwarding(temp_zone, result, data->sequence())) {
+ if (JumpThreading::ComputeForwarding(temp_zone, result, data->sequence(),
+ frame_at_start)) {
JumpThreading::ApplyForwarding(result, data->sequence());
}
}
@@ -1334,10 +1335,16 @@ Handle<Code> Pipeline::ScheduleAndGenerateCode(
}
BeginPhaseKind("code generation");
-
+ // TODO(mtrofin): move this off to the register allocator.
Jarin 2016/01/28 05:26:58 Yes, please do.
+ bool generate_frame_at_start =
+ !FLAG_turbo_frame_elision || !data_->info()->IsStub() ||
+ !data_->frame()->needs_frame() ||
+ data_->sequence()->instruction_blocks().front()->needs_frame() ||
+ linkage.GetIncomingDescriptor()->CalleeSavedFPRegisters() != 0 ||
+ linkage.GetIncomingDescriptor()->CalleeSavedRegisters() != 0;
// Optimimize jumps.
if (FLAG_turbo_jt) {
- Run<JumpThreadingPhase>();
+ Run<JumpThreadingPhase>(generate_frame_at_start);
}
// Generate final machine code.

Powered by Google App Engine
This is Rietveld 408576698