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

Unified Diff: src/IceOperand.h

Issue 656023002: Subzero: Register allocator performance improvements and simplifications. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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/IceLiveness.cpp ('k') | src/IceRegAlloc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceOperand.h
diff --git a/src/IceOperand.h b/src/IceOperand.h
index 9a3160619bfd4468c1223cb45267828c5b8ecdea..9d864fcf12d69916f2ed05a641d4ab8c3933cbd2 100644
--- a/src/IceOperand.h
+++ b/src/IceOperand.h
@@ -412,6 +412,7 @@ public:
void setWeight(uint32_t NewWeight) { Weight = NewWeight; }
void setWeightInfinite() { Weight = RegWeight::Inf; }
+ LiveRange &getLiveRange() { return Live; }
jvoung (off chromium) 2014/10/15 16:42:36 There's also the const LiveRange &getLiveRange() c
Jim Stichnoth 2014/10/15 16:47:41 Unfortunately, at least one caller needs the const
const LiveRange &getLiveRange() const { return Live; }
void setLiveRange(const LiveRange &Range) { Live = Range; }
void resetLiveRange() { Live.reset(); }
@@ -426,6 +427,17 @@ public:
void setLiveRangeInfiniteWeight() { Live.setWeight(RegWeight::Inf); }
void trimLiveRange(InstNumberT Start) { Live.trim(Start); }
void untrimLiveRange() { Live.untrim(); }
+ bool rangeEndsBefore(const Variable *Other) const {
+ return Live.endsBefore(Other->Live);
+ }
+ bool rangeOverlaps(const Variable *Other) const {
+ const bool UseTrimmed = true;
+ return Live.overlaps(Other->Live, UseTrimmed);
+ }
+ bool rangeOverlapsStart(const Variable *Other) const {
+ const bool UseTrimmed = true;
+ return Live.overlapsInst(Other->Live.getStart(), UseTrimmed);
+ }
Variable *getLo() const { return LoVar; }
Variable *getHi() const { return HiVar; }
« no previous file with comments | « src/IceLiveness.cpp ('k') | src/IceRegAlloc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698