diff options
Diffstat (limited to 'compiler/optimizing/locations.h')
-rw-r--r-- | compiler/optimizing/locations.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/optimizing/locations.h b/compiler/optimizing/locations.h index 68d605957f..dda6c94a3d 100644 --- a/compiler/optimizing/locations.h +++ b/compiler/optimizing/locations.h @@ -37,7 +37,10 @@ std::ostream& operator<<(std::ostream& os, const Location& location); */ class Location : public ValueObject { public: - static constexpr bool kNoOutputOverlap = false; + enum OutputOverlap { + kOutputOverlap, + kNoOutputOverlap + }; enum Kind { kInvalid = 0, @@ -468,7 +471,7 @@ class LocationSummary : public ArenaObject<kArenaAllocMisc> { return inputs_.Size(); } - void SetOut(Location location, bool overlaps = true) { + void SetOut(Location location, Location::OutputOverlap overlaps = Location::kOutputOverlap) { DCHECK(output_.IsUnallocated() || output_.IsInvalid()); output_overlaps_ = overlaps; output_ = location; @@ -561,7 +564,7 @@ class LocationSummary : public ArenaObject<kArenaAllocMisc> { } bool OutputOverlapsWithInputs() const { - return output_overlaps_; + return output_overlaps_ == Location::kOutputOverlap; } bool Intrinsified() const { @@ -574,7 +577,7 @@ class LocationSummary : public ArenaObject<kArenaAllocMisc> { GrowableArray<Location> environment_; // Whether the output overlaps with any of the inputs. If it overlaps, then it cannot // share the same register as the inputs. - bool output_overlaps_; + Location::OutputOverlap output_overlaps_; Location output_; const CallKind call_kind_; |