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

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

Issue 694473002: [turbofan] optimize hot loop in ResolveControlFlow (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/register-allocator.cc » ('j') | src/compiler/register-allocator.cc » ('J')
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 40fafb1dcf7c5c92a163544a9cf73d4a217a06a9..7cd3f30d434d5e8babcb050bc4aad4eea962a73f 100644
--- a/src/compiler/register-allocator.h
+++ b/src/compiler/register-allocator.h
@@ -186,12 +186,15 @@ class LiveRange FINAL : public ZoneObject {
UsePosition* first_pos() const { return first_pos_; }
LiveRange* parent() const { return parent_; }
LiveRange* TopLevel() { return (parent_ == NULL) ? this : parent_; }
+ const LiveRange* TopLevel() const {
+ return (parent_ == NULL) ? this : parent_;
+ }
LiveRange* next() const { return next_; }
bool IsChild() const { return parent() != NULL; }
int id() const { return id_; }
bool IsFixed() const { return id_ < 0; }
bool IsEmpty() const { return first_interval() == NULL; }
- InstructionOperand* CreateAssignedOperand(Zone* zone);
+ InstructionOperand* CreateAssignedOperand(Zone* zone) const;
int assigned_register() const { return assigned_register_; }
int spill_start_index() const { return spill_start_index_; }
void set_assigned_register(int reg, Zone* zone);
@@ -347,6 +350,8 @@ class RegisterAllocator BASE_EMBEDDED {
return fixed_double_live_ranges_;
}
InstructionSequence* code() const { return code_; }
+ // This zone is for datastructures only needed during register allocation.
+ Zone* zone() const { return zone_; }
Jarin 2014/11/04 10:42:09 Since you already touching this, could you possibl
dcarney 2014/11/05 09:02:02 Done.
private:
int GetVirtualRegister() {
@@ -366,9 +371,6 @@ class RegisterAllocator BASE_EMBEDDED {
// Returns the register kind required by the given virtual register.
RegisterKind RequiredRegisterKind(int virtual_register) const;
- // This zone is for datastructures only needed during register allocation.
- Zone* zone() const { return zone_; }
-
// This zone is for InstructionOperands and moves that live beyond register
// allocation.
Zone* code_zone() const { return code()->zone(); }
@@ -475,8 +477,10 @@ class RegisterAllocator BASE_EMBEDDED {
bool IsBlockBoundary(LifetimePosition pos);
// Helper methods for resolving control flow.
- void ResolveControlFlow(LiveRange* range, const InstructionBlock* block,
- const InstructionBlock* pred);
+ void ResolveControlFlow(const InstructionBlock* block,
+ const LiveRange* cur_cover,
+ const InstructionBlock* pred,
+ const LiveRange* pred_cover);
void SetLiveRangeAssignedRegister(LiveRange* range, int reg);
« no previous file with comments | « no previous file | src/compiler/register-allocator.cc » ('j') | src/compiler/register-allocator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698