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

Unified Diff: src/compiler/pipeline.cc

Issue 1261923007: [turbofan] Unify referencing of stack slots (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 5 years, 4 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/pipeline.h ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index a1b82318c2753ec883accf8abd7d425643a42fcc..e9545b8f3eff884902f8dcf7f21af3656dee4af6 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -259,10 +259,17 @@ class PipelineData {
}
void InitializeRegisterAllocationData(const RegisterConfiguration* config,
+ CallDescriptor* descriptor,
const char* debug_name) {
DCHECK(frame_ == nullptr);
DCHECK(register_allocation_data_ == nullptr);
- frame_ = new (instruction_zone()) Frame();
+ int fixed_frame_size = 0;
+ if (descriptor != nullptr) {
+ fixed_frame_size = (descriptor->kind() == CallDescriptor::kCallAddress)
+ ? StandardFrameConstants::kFixedSlotCountAboveFp
+ : StandardFrameConstants::kFixedSlotCount;
+ }
+ frame_ = new (instruction_zone()) Frame(fixed_frame_size);
register_allocation_data_ = new (register_allocation_zone())
RegisterAllocationData(config, register_allocation_zone(), frame(),
sequence(), debug_name);
@@ -1190,7 +1197,7 @@ bool Pipeline::AllocateRegistersForTesting(const RegisterConfiguration* config,
PipelineData data(&zone_pool, &info, sequence);
Pipeline pipeline(&info);
pipeline.data_ = &data;
- pipeline.AllocateRegisters(config, run_verifier);
+ pipeline.AllocateRegisters(config, nullptr, run_verifier);
return !data.compilation_failed();
}
@@ -1234,7 +1241,8 @@ Handle<Code> Pipeline::ScheduleAndGenerateCode(
bool run_verifier = FLAG_turbo_verify_allocation;
// Allocate registers.
- AllocateRegisters(RegisterConfiguration::ArchDefault(), run_verifier);
+ AllocateRegisters(RegisterConfiguration::ArchDefault(), call_descriptor,
+ run_verifier);
if (data->compilation_failed()) {
info()->AbortOptimization(kNotEnoughVirtualRegistersRegalloc);
return Handle<Code>();
@@ -1293,6 +1301,7 @@ Handle<Code> Pipeline::ScheduleAndGenerateCode(
void Pipeline::AllocateRegisters(const RegisterConfiguration* config,
+ CallDescriptor* descriptor,
bool run_verifier) {
PipelineData* data = this->data_;
@@ -1310,7 +1319,7 @@ void Pipeline::AllocateRegisters(const RegisterConfiguration* config,
debug_name = GetDebugName(data->info());
#endif
- data->InitializeRegisterAllocationData(config, debug_name.get());
+ data->InitializeRegisterAllocationData(config, descriptor, debug_name.get());
if (info()->is_osr()) {
OsrHelper osr_helper(info());
osr_helper.SetupFrame(data->frame());
« no previous file with comments | « src/compiler/pipeline.h ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698