[PATCH] D90046: [LiveDebugValues] Handle spill locations with a fixed and scalable component.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 00:50:39 PST 2020


sdesmalen added inline comments.


================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp:231
   bool operator<(const SpillLoc &Other) const {
-    return std::tie(SpillBase, SpillOffset) <
-           std::tie(Other.SpillBase, Other.SpillOffset);
+    return std::make_tuple(SpillBase, SpillOffset.getFixed(),
+                    SpillOffset.getScalable()) <
----------------
djtodoro wrote:
> We use tuples here because `std::tie()` takes l-values only?
Yes, that's right.


================
Comment at: llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp:553
+      case SpillLocKind:
+        return Loc.SpillLocation == Other.Loc.SpillLocation;
+      case RegisterKind:
----------------
djtodoro wrote:
> Do we use `Loc.Hash` for the case of Spill locations?
We did before, because `uint64_t Hash` covered `SpillLoc` (which contains an `unsigned` (SpillBase) and `int` (SpillOffset)). But now that SpillOffset is a `StackOffset` instead of an `int`, `uint64_t Hash` no longer covers all those bits so we need to explicitly compare the two.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90046/new/

https://reviews.llvm.org/D90046



More information about the llvm-commits mailing list