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

Unified Diff: src/compiler/pipeline.cc

Issue 671043004: [turbofan] cleanup register allocator interface a little (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/register-allocator.h » ('j') | src/compiler/register-allocator.h » ('J')
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 bf64f6665c79d4c7274a8d016e7ec2116cd617fa..94e155422ae828c08cfe31e36166755d4c1f0fde 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -556,7 +556,24 @@ Handle<Code> Pipeline::GenerateCode(Linkage* linkage, PipelineData* data) {
return Handle<Code>::null();
}
ZonePool::Scope zone_scope(data->zone_pool());
- RegisterAllocator allocator(zone_scope.zone(), &frame, info(), &sequence);
+
+ const char* debug_name = NULL;
+#ifdef DEBUG
+ SmartArrayPointer<char> debug_name_chars;
+ if (info()->IsStub()) {
+ if (info()->code_stub() != NULL) {
+ CodeStub::Major major_key = info()->code_stub()->MajorKey();
+ debug_name = CodeStub::MajorName(major_key, false);
+ }
+ } else {
+ AllowHandleDereference allow_deref;
+ debug_name_chars = info()->function()->debug_name()->ToCString();
+ debug_name = debug_name_chars.get();
+ }
+#endif
Jarin 2014/10/29 12:16:51 Could you extract the code above to a function and
+
+ RegisterAllocator allocator(zone_scope.zone(), &frame, &sequence,
+ debug_name);
if (!allocator.Allocate(data->pipeline_statistics())) {
info()->AbortOptimization(kNotEnoughVirtualRegistersRegalloc);
return Handle<Code>::null();
« no previous file with comments | « no previous file | src/compiler/register-allocator.h » ('j') | src/compiler/register-allocator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698