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/register-allocator.h

Issue 810403003: [turbofan] remove checks for virtual register overflow (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/compiler/pipeline.cc ('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/register-allocator.h
diff --git a/src/compiler/register-allocator.h b/src/compiler/register-allocator.h
index b17837ba59efe89a32a948bd79ee6be240f5a2c1..b8219882fcc1c976ce20104ee96138e7e22b0abb 100644
--- a/src/compiler/register-allocator.h
+++ b/src/compiler/register-allocator.h
@@ -377,8 +377,6 @@ class RegisterAllocator FINAL : public ZoneObject {
InstructionSequence* code,
const char* debug_name = nullptr);
- bool AllocationOk() { return allocation_ok_; }
-
const ZoneVector<LiveRange*>& live_ranges() const { return live_ranges_; }
const ZoneVector<LiveRange*>& fixed_live_ranges() const {
return fixed_live_ranges_;
@@ -421,15 +419,7 @@ class RegisterAllocator FINAL : public ZoneObject {
void ResolveControlFlow();
private:
- int GetVirtualRegister() {
- int vreg = code()->NextVirtualRegister();
- if (vreg >= UnallocatedOperand::kMaxVirtualRegisters) {
- allocation_ok_ = false;
- // Maintain the invariant that we return something below the maximum.
- return 0;
- }
- return vreg;
- }
+ int GetVirtualRegister() { return code()->NextVirtualRegister(); }
// Checks whether the value of a given virtual register is a reference.
// TODO(titzer): rename this to IsReference.
@@ -625,9 +615,6 @@ class RegisterAllocator FINAL : public ZoneObject {
BitVector* assigned_registers_;
BitVector* assigned_double_registers_;
- // Indicates success or failure during register allocation.
- bool allocation_ok_;
-
#ifdef DEBUG
LifetimePosition allocation_finger_;
#endif
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698