[all-commits] [llvm/llvm-project] afa413: [RemoveDIs][DebugInfo] Correctly visit DPValues in...

Stephen Tozer via All-commits all-commits at lists.llvm.org
Mon Feb 12 05:50:48 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: afa413a132c0959295df36c28814ee83948e4931
      https://github.com/llvm/llvm-project/commit/afa413a132c0959295df36c28814ee83948e4931
  Author: Stephen Tozer <stephen.tozer at sony.com>
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp
    M llvm/test/Instrumentation/HWAddressSanitizer/dbg-declare-tag-offset.ll

  Log Message:
  -----------
  [RemoveDIs][DebugInfo] Correctly visit DPValues in StackInfoBuilder::visit (#81247)

In `StackInfoBuilder::visit(Instruction &Inst)`, operations are
performed on memory-related instructions, including debug intrinsics
that refer to "interesting" allocas. There is a block that also visits
DPValues attached to the instruction, but this block is near the end of
the function; this has two problems:
1. The DPValues attached to an instruction precede that instruction, so
they should always be processed before the instruction itself.
2. More importantly, some of the paths for visiting other instructions
contain early returns, which will result in the DPValues not being
visited at all.

This patch simply moves the DPValue-visiting block to the top of the
function, which should resolve both of these problems.




More information about the All-commits mailing list