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

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

Issue 1824303002: check if we can split (linear scan) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | 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 d6ed0052704024939cdeb154b06210d62a8d7fa1..6d3b786408d92c59103dbc1a19bcf6b73de113f8 100644
--- a/src/compiler/register-allocator.h
+++ b/src/compiler/register-allocator.h
@@ -46,6 +46,14 @@ class LifetimePosition final {
return LifetimePosition(index * kStep + kHalfStep);
}
+ static bool ExistsGapPositionBetween(LifetimePosition pos1,
+ LifetimePosition pos2) {
+ if (pos1 > pos2) std::swap(pos1, pos2);
+ LifetimePosition next(pos1.value_ + 1);
+ if (next.IsGapPosition()) return next < pos2;
+ return next.NextFullStart() < pos2;
+ }
+
// Returns a numeric representation of this lifetime position.
int value() const { return value_; }
« no previous file with comments | « no previous file | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698