Chromium Code Reviews| 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; } |