[PATCH] D117162: [DebugInfo][InstrRef] Short-circuit unnecessary preferred location map construction
Eugene Zhulenev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 12 14:44:53 PST 2022
ezhulenev created this revision.
Herald added a subscriber: hiraditya.
ezhulenev requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
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
@@ -271,6 +271,12 @@
return false;
};
+ // Short-circuit unnecessary preferred location map construction.
+ if (VLocs.empty()) {
+ flushDbgValues(MBB.begin(), &MBB);
+ return;
+ }
+
// Map of the preferred location for each value.
std::map<ValueIDNum, LocIdx> ValueToLoc;
ActiveMLocs.reserve(VLocs.size());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117162.399477.patch
Type: text/x-patch
Size: 603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220112/8947b6e1/attachment.bin>
More information about the llvm-commits
mailing list