[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 02:20:08 PST 2022
ezhulenev updated this revision to Diff 399602.
ezhulenev added a comment.
Fix bugs
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.399602.patch
Type: text/x-patch
Size: 610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220113/e35ba190/attachment.bin>
More information about the llvm-commits
mailing list