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

Side by Side Diff: src/compiler/pipeline.cc

Issue 713803002: [turbofan] add register assignment verifier (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/platform/elapsed-timer.h" 10 #include "src/base/platform/elapsed-timer.h"
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 Frame frame; 577 Frame frame;
578 { 578 {
579 int node_count = sequence.VirtualRegisterCount(); 579 int node_count = sequence.VirtualRegisterCount();
580 if (node_count > UnallocatedOperand::kMaxVirtualRegisters) { 580 if (node_count > UnallocatedOperand::kMaxVirtualRegisters) {
581 info()->AbortOptimization(kNotEnoughVirtualRegistersForValues); 581 info()->AbortOptimization(kNotEnoughVirtualRegistersForValues);
582 return Handle<Code>::null(); 582 return Handle<Code>::null();
583 } 583 }
584 ZonePool::Scope zone_scope(data->zone_pool()); 584 ZonePool::Scope zone_scope(data->zone_pool());
585 585
586 SmartArrayPointer<char> debug_name; 586 SmartArrayPointer<char> debug_name;
587 RegisterAllocator::VerificationType verification_type =
588 RegisterAllocator::kNoVerify;
587 #ifdef DEBUG 589 #ifdef DEBUG
588 debug_name = GetDebugName(info()); 590 debug_name = GetDebugName(info());
591 verification_type = RegisterAllocator::kVerifyAssignment;
589 #endif 592 #endif
590 593
591
592 RegisterAllocator allocator(RegisterConfiguration::ArchDefault(), 594 RegisterAllocator allocator(RegisterConfiguration::ArchDefault(),
593 zone_scope.zone(), &frame, &sequence, 595 zone_scope.zone(), &frame, &sequence,
594 debug_name.get()); 596 debug_name.get());
595 if (!allocator.Allocate(data->pipeline_statistics())) { 597 if (!allocator.Allocate(data->pipeline_statistics(), verification_type)) {
596 info()->AbortOptimization(kNotEnoughVirtualRegistersRegalloc); 598 info()->AbortOptimization(kNotEnoughVirtualRegistersRegalloc);
597 return Handle<Code>::null(); 599 return Handle<Code>::null();
598 } 600 }
599 if (FLAG_trace_turbo) { 601 if (FLAG_trace_turbo) {
600 TurboCfgFile tcf(isolate()); 602 TurboCfgFile tcf(isolate());
601 tcf << AsC1VAllocator("CodeGen", &allocator); 603 tcf << AsC1VAllocator("CodeGen", &allocator);
602 } 604 }
603 } 605 }
604 606
605 if (FLAG_trace_turbo) { 607 if (FLAG_trace_turbo) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 } 639 }
638 640
639 641
640 void Pipeline::TearDown() { 642 void Pipeline::TearDown() {
641 InstructionOperand::TearDownCaches(); 643 InstructionOperand::TearDownCaches();
642 } 644 }
643 645
644 } // namespace compiler 646 } // namespace compiler
645 } // namespace internal 647 } // namespace internal
646 } // namespace v8 648 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698