[PATCH] D144481: [Assignment Tracking] Only set module flag if pass modifies a function

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 06:39:41 PST 2023


Orlando created this revision.
Orlando added reviewers: scott.linder, jmorse, StephenTozer.
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.

The module flag "debug-info-assignment-tracking" is set by the declare-to-assign pass to indicate that assignment tracking is enabled. This patch changes declare-to-assign to only set the flag if it makes a modification. This lets the compiler avoid doing extra work for no benefit, such as is currently the case if assignment tracking is requested for a build with line tables only (-gmlt) or a build without debug info.


https://reviews.llvm.org/D144481

Files:
  llvm/include/llvm/IR/DebugInfo.h
  llvm/lib/IR/DebugInfo.cpp
  llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/set-flag-only-if-modified.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144481.499151.patch
Type: text/x-patch
Size: 4642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230221/f84efed2/attachment.bin>


More information about the llvm-commits mailing list