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

Unified Diff: src/compiler/register-allocator.h

Issue 663333003: [turbofan] use ZonePool in most places in the compiler pipeline a temp zone is used. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase 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 | « 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 adcc9043dadca1140aea97de742de49f8a72c328..60d08433af173a09941da10f3a416f88a1c493bb 100644
--- a/src/compiler/register-allocator.h
+++ b/src/compiler/register-allocator.h
@@ -7,6 +7,7 @@
#include "src/allocation.h"
#include "src/compiler/instruction.h"
+#include "src/compiler/zone-pool.h"
#include "src/macro-assembler.h"
#include "src/zone.h"
@@ -318,8 +319,8 @@ class LiveRange : public ZoneObject {
class RegisterAllocator BASE_EMBEDDED {
public:
// TODO(dcarney): remove info
- explicit RegisterAllocator(Frame* frame, CompilationInfo* info,
- InstructionSequence* code);
+ explicit RegisterAllocator(Zone* local_zone, Frame* frame,
+ CompilationInfo* info, InstructionSequence* code);
static void TraceAlloc(const char* msg, ...);
@@ -330,7 +331,8 @@ class RegisterAllocator BASE_EMBEDDED {
// Returns the register kind required by the given virtual register.
RegisterKind RequiredRegisterKind(int virtual_register) const;
- bool Allocate();
+ // TODO(dcarney): fix compilation phase stats to not require this.
+ bool Allocate(ZonePool* zone_pool = NULL);
const ZoneList<LiveRange*>* live_ranges() const { return &live_ranges_; }
const Vector<LiveRange*>* fixed_live_ranges() const {
@@ -342,13 +344,14 @@ class RegisterAllocator BASE_EMBEDDED {
CompilationInfo* info() const { return info_; }
inline InstructionSequence* code() const { return code_; }
+ ZonePool* zone_pool() const { return zone_pool_; }
// This zone is for datastructures only needed during register allocation.
- inline Zone* zone() { return &zone_; }
+ inline Zone* zone() const { return zone_; }
// This zone is for InstructionOperands and moves that live beyond register
// allocation.
- inline Zone* code_zone() { return code()->zone(); }
+ inline Zone* code_zone() const { return code()->zone(); }
int GetVirtualRegister() {
int vreg = code()->NextVirtualRegister();
@@ -497,7 +500,9 @@ class RegisterAllocator BASE_EMBEDDED {
Frame* frame() const { return frame_; }
- Zone zone_;
+ Zone* const zone_;
+ // TODO(dcarney): remove this.
+ ZonePool* zone_pool_;
Frame* const frame_;
CompilationInfo* const info_;
InstructionSequence* const code_;
@@ -535,18 +540,6 @@ class RegisterAllocator BASE_EMBEDDED {
DISALLOW_COPY_AND_ASSIGN(RegisterAllocator);
};
-
-class RegisterAllocatorPhase : public CompilationPhase {
- public:
- RegisterAllocatorPhase(const char* name, RegisterAllocator* allocator);
- ~RegisterAllocatorPhase();
-
- private:
- RegisterAllocator* allocator_;
- unsigned allocator_zone_start_allocation_size_;
-
- DISALLOW_COPY_AND_ASSIGN(RegisterAllocatorPhase);
-};
}
}
} // namespace v8::internal::compiler
« 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