[PATCH] D140412: [DebugInfo] Unify location selection logic for values in InstrRefBasedImpl
Stephen Tozer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 20 09:00:56 PST 2022
StephenTozer created this revision.
StephenTozer added a reviewer: jmorse.
StephenTozer added a project: debug-info.
Herald added a subscriber: hiraditya.
Herald added a project: All.
StephenTozer requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Currently the instruction referencing live debug values has 3 separate places where we iterate over all known locations to find the best machine location for a set of values at a given point in the program. Each of these places has an implementation of this check, and one of them has slightly different logic to the others (`TransferTracker::loadInLocs` prefers registers to spill slots). This patch moves the check for the "quality" of a machine location into a separate function, which also avoids repeatedly calling some slightly-expensive functions, giving a slight performance improvement in optimized debug builds [0].
[0] http://llvm-compile-time-tracker.com/compare.php?from=2ec98ffbf12163ee4ff9f4e674eba714bce24ec1&to=e5163ffef719cd55f7c9641988bbb64effd23b75&stat=instructions%3Au
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D140412
Files:
llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
llvm/test/DebugInfo/MIR/X86/live-debug-values-restore.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140412.484293.patch
Type: text/x-patch
Size: 9968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221220/4583001b/attachment.bin>
More information about the llvm-commits
mailing list