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

Side by Side Diff: src/lithium-allocator.h

Issue 309373002: ARM64: Regenerate instead of spilling and restoring cheap lithium instructions. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/lithium.cc ('k') | src/lithium-allocator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_LITHIUM_ALLOCATOR_H_ 5 #ifndef V8_LITHIUM_ALLOCATOR_H_
6 #define V8_LITHIUM_ALLOCATOR_H_ 6 #define V8_LITHIUM_ALLOCATOR_H_
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 #include "allocation.h" 10 #include "allocation.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 LifetimePosition end, 343 LifetimePosition end,
344 Zone* zone); 344 Zone* zone);
345 void AddUsePosition(LifetimePosition pos, 345 void AddUsePosition(LifetimePosition pos,
346 LOperand* operand, 346 LOperand* operand,
347 LOperand* hint, 347 LOperand* hint,
348 Zone* zone); 348 Zone* zone);
349 349
350 // Shorten the most recently added interval by setting a new start. 350 // Shorten the most recently added interval by setting a new start.
351 void ShortenTo(LifetimePosition start); 351 void ShortenTo(LifetimePosition start);
352 352
353 void set_parent_linstr(LInstruction* instr) {
354 parent_linstr_ = instr;
355 spill_operand_->set_parent_linstr(instr);
356 }
357 LInstruction* parent_linstr() const { return parent_linstr_; }
358
353 #ifdef DEBUG 359 #ifdef DEBUG
354 // True if target overlaps an existing interval. 360 // True if target overlaps an existing interval.
355 bool HasOverlap(UseInterval* target) const; 361 bool HasOverlap(UseInterval* target) const;
356 void Verify() const; 362 void Verify() const;
357 #endif 363 #endif
358 364
359 private: 365 private:
360 void ConvertOperands(Zone* zone); 366 void ConvertOperands(Zone* zone);
361 UseInterval* FirstSearchIntervalForPosition(LifetimePosition position) const; 367 UseInterval* FirstSearchIntervalForPosition(LifetimePosition position) const;
362 void AdvanceLastProcessedMarker(UseInterval* to_start_of, 368 void AdvanceLastProcessedMarker(UseInterval* to_start_of,
363 LifetimePosition but_not_past) const; 369 LifetimePosition but_not_past) const;
364 370
365 int id_; 371 int id_;
366 bool spilled_; 372 bool spilled_;
367 RegisterKind kind_; 373 RegisterKind kind_;
368 int assigned_register_; 374 int assigned_register_;
369 UseInterval* last_interval_; 375 UseInterval* last_interval_;
370 UseInterval* first_interval_; 376 UseInterval* first_interval_;
371 UsePosition* first_pos_; 377 UsePosition* first_pos_;
372 LiveRange* parent_; 378 LiveRange* parent_;
373 LiveRange* next_; 379 LiveRange* next_;
374 // This is used as a cache, it doesn't affect correctness. 380 // This is used as a cache, it doesn't affect correctness.
375 mutable UseInterval* current_interval_; 381 mutable UseInterval* current_interval_;
376 UsePosition* last_processed_use_; 382 UsePosition* last_processed_use_;
377 // This is used as a cache, it's invalid outside of BuildLiveRanges. 383 // This is used as a cache, it's invalid outside of BuildLiveRanges.
378 LOperand* current_hint_operand_; 384 LOperand* current_hint_operand_;
379 LOperand* spill_operand_; 385 LOperand* spill_operand_;
380 int spill_start_index_; 386 int spill_start_index_;
387 LInstruction* parent_linstr_;
381 388
382 friend class LAllocator; // Assigns to kind_. 389 friend class LAllocator; // Assigns to kind_.
383 }; 390 };
384 391
385 392
386 class LAllocator BASE_EMBEDDED { 393 class LAllocator BASE_EMBEDDED {
387 public: 394 public:
388 LAllocator(int first_virtual_register, HGraph* graph); 395 LAllocator(int first_virtual_register, HGraph* graph);
389 396
390 static void TraceAlloc(const char* msg, ...); 397 static void TraceAlloc(const char* msg, ...);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 LAllocator* allocator_; 632 LAllocator* allocator_;
626 unsigned allocator_zone_start_allocation_size_; 633 unsigned allocator_zone_start_allocation_size_;
627 634
628 DISALLOW_COPY_AND_ASSIGN(LAllocatorPhase); 635 DISALLOW_COPY_AND_ASSIGN(LAllocatorPhase);
629 }; 636 };
630 637
631 638
632 } } // namespace v8::internal 639 } } // namespace v8::internal
633 640
634 #endif // V8_LITHIUM_ALLOCATOR_H_ 641 #endif // V8_LITHIUM_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « src/lithium.cc ('k') | src/lithium-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698