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

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

Issue 2347563004: [turbofan] Avoid large deopt blocks (Closed)
Patch Set: [turbofan] Avoid large deopt blocks Created 4 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/instruction.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 2089ea2fc1f9f1e831ddf54809e041722b518edf..5c425345ccf06df401da536fd331ddcbd3a60369 100644
--- a/src/compiler/register-allocator.h
+++ b/src/compiler/register-allocator.h
@@ -275,6 +275,7 @@ class UsePosition final : public ZoneObject {
}
bool HasHint() const;
bool HintRegister(int* register_code) const;
+ void SetHint(UsePosition* use_pos);
void ResolveHint(UsePosition* use_pos);
bool IsResolved() const {
return hint_type() != UsePositionHintType::kUnresolved;
@@ -368,8 +369,12 @@ class LiveRange : public ZoneObject {
// live range to the result live range.
// The current range will terminate at position, while result will start from
// position.
+ enum HintConnectionOption : bool {
+ DoNotConnectHints = false,
+ ConnectHints = true
+ };
UsePosition* DetachAt(LifetimePosition position, LiveRange* result,
- Zone* zone);
+ Zone* zone, HintConnectionOption connect_hints);
// Detaches at position, and then links the resulting ranges. Returns the
// child, which starts at position.
@@ -1047,8 +1052,15 @@ class LinearScanAllocator final : public RegisterAllocator {
// Helper methods for allocating registers.
bool TryReuseSpillForPhi(TopLevelLiveRange* range);
- bool TryAllocateFreeReg(LiveRange* range);
+ bool TryAllocateFreeReg(LiveRange* range,
+ const Vector<LifetimePosition>& free_until_pos);
+ bool TryAllocatePreferredReg(LiveRange* range,
+ const Vector<LifetimePosition>& free_until_pos);
+ void FindFreeRegistersForRange(LiveRange* range,
+ Vector<LifetimePosition> free_until_pos);
+ void ProcessCurrentRange(LiveRange* current);
void AllocateBlockedReg(LiveRange* range);
+ bool TrySplitAndSpillSplinter(LiveRange* range);
// Spill the given life range after position pos.
void SpillAfter(LiveRange* range, LifetimePosition pos);
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698