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

Side by Side Diff: src/compiler/register-allocator.h

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 #ifndef V8_REGISTER_ALLOCATOR_H_ 5 #ifndef V8_REGISTER_ALLOCATOR_H_
6 #define V8_REGISTER_ALLOCATOR_H_ 6 #define V8_REGISTER_ALLOCATOR_H_
7 7
8 #include "src/compiler/instruction.h" 8 #include "src/compiler/instruction.h"
9 #include "src/zone-containers.h" 9 #include "src/zone-containers.h"
10 10
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 int spill_start_index_; 315 int spill_start_index_;
316 316
317 friend class RegisterAllocator; // Assigns to kind_. 317 friend class RegisterAllocator; // Assigns to kind_.
318 318
319 DISALLOW_COPY_AND_ASSIGN(LiveRange); 319 DISALLOW_COPY_AND_ASSIGN(LiveRange);
320 }; 320 };
321 321
322 322
323 class RegisterAllocator FINAL { 323 class RegisterAllocator FINAL {
324 public: 324 public:
325 enum VerificationType { kNoVerify, kVerifyAssignment };
326
325 explicit RegisterAllocator(const RegisterConfiguration* config, 327 explicit RegisterAllocator(const RegisterConfiguration* config,
326 Zone* local_zone, Frame* frame, 328 Zone* local_zone, Frame* frame,
327 InstructionSequence* code, 329 InstructionSequence* code,
328 const char* debug_name = nullptr); 330 const char* debug_name = nullptr);
329 331
330 bool Allocate(PipelineStatistics* stats = NULL); 332 bool Allocate(PipelineStatistics* stats = NULL,
333 VerificationType verification_type = kNoVerify);
331 bool AllocationOk() { return allocation_ok_; } 334 bool AllocationOk() { return allocation_ok_; }
332 BitVector* assigned_registers() { return assigned_registers_; } 335 BitVector* assigned_registers() { return assigned_registers_; }
333 BitVector* assigned_double_registers() { return assigned_double_registers_; } 336 BitVector* assigned_double_registers() { return assigned_double_registers_; }
334 337
335 const ZoneList<LiveRange*>& live_ranges() const { return live_ranges_; } 338 const ZoneList<LiveRange*>& live_ranges() const { return live_ranges_; }
336 const ZoneVector<LiveRange*>& fixed_live_ranges() const { 339 const ZoneVector<LiveRange*>& fixed_live_ranges() const {
337 return fixed_live_ranges_; 340 return fixed_live_ranges_;
338 } 341 }
339 const ZoneVector<LiveRange*>& fixed_double_live_ranges() const { 342 const ZoneVector<LiveRange*>& fixed_double_live_ranges() const {
340 return fixed_double_live_ranges_; 343 return fixed_double_live_ranges_;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 #endif 537 #endif
535 538
536 DISALLOW_COPY_AND_ASSIGN(RegisterAllocator); 539 DISALLOW_COPY_AND_ASSIGN(RegisterAllocator);
537 }; 540 };
538 541
539 } 542 }
540 } 543 }
541 } // namespace v8::internal::compiler 544 } // namespace v8::internal::compiler
542 545
543 #endif // V8_REGISTER_ALLOCATOR_H_ 546 #endif // V8_REGISTER_ALLOCATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698