[PATCH] D146978: [Assignment Tracking][NFC] Improve removeRedundantDbgLocsUsingBackwardScan

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 27 08:49:38 PDT 2023


Orlando created this revision.
Orlando added reviewers: jmorse, StephenTozer, scott.linder.
Orlando added a project: debug-info.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Orlando requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

`removeRedundantDbgLocsUsingBackwardScan` removes redundant dbg loc definitions by scanning backwards through contiguous sets of them (a "wedge"), removing earlier (in IR order terms) defs for fragments of variables that are defined later in the wedge.

In this patch we use a `Bitvector` for each variable to track which bits have definitions to more accurately determine whether a loc def is redundant. This patch increases compile time by itself, but reduces it when combined with the follow-up patch.


https://reviews.llvm.org/D146978

Files:
  llvm/include/llvm/IR/DebugInfoMetadata.h
  llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
  llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll
  llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-bwd-scan.ll
  llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-frag.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146978.508677.patch
Type: text/x-patch
Size: 12473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230327/fd78872e/attachment.bin>


More information about the llvm-commits mailing list