[PATCH] D117162: [DebugInfo][InstrRef] Short-circuit unnecessary preferred location map construction

Eugene Zhulenev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 13 06:25:03 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG764e52f0d4b6: [DebugInfo][InstrRef] Short-circuit unnecessary preferred location map… (authored by ezhulenev).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117162

Files:
  llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp


Index: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
===================================================================
--- llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -283,6 +283,11 @@
       LocIdx Idx = Location.Idx;
       ValueIDNum &VNum = MLocs[Idx.asU64()];
       VarLocs.push_back(VNum);
+
+      // Short-circuit unnecessary preferred location update.
+      if (VLocs.empty())
+        continue;
+
       auto it = ValueToLoc.find(VNum);
       // In order of preference, pick:
       //  * Callee saved registers,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117162.399657.patch
Type: text/x-patch
Size: 610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220113/78d9176a/attachment.bin>


More information about the llvm-commits mailing list