[PATCH] D140412: [DebugInfo] Unify location selection logic for values in InstrRefBasedImpl

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 09:26:50 PST 2022


jmorse accepted this revision.
jmorse added a comment.
This revision is now accepted and ready to land.

Slightly twitchy about there being a zero LocIdx -- I think I tried to suppress there being any default-constructed LocIdxes out there. On the other hand, it comes with a sentinel value attached, so it's no big deal.

LGTM.



================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp:1616-1617
+      if (ReplacementQuality) {
+        FoundLoc =
+            TransferTracker::LocationAndQuality(CurL, *ReplacementQuality);
+        if (*ReplacementQuality == TransferTracker::LocationQuality::Best)
----------------
Feels like an "isBest" method on the LocationAndQuality class might be the best way of performing the check below?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140412



More information about the llvm-commits mailing list