[all-commits] [llvm/llvm-project] 77ffce: [Instruction] Set metadata uses to undef on deletion
Vedant Kumar via All-commits
all-commits at lists.llvm.org
Thu May 21 15:58:48 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 77ffce6954470018de1748d33f9ac6aa66121e9f
https://github.com/llvm/llvm-project/commit/77ffce6954470018de1748d33f9ac6aa66121e9f
Author: Vedant Kumar <vsk at apple.com>
Date: 2020-05-21 (Thu, 21 May 2020)
Changed paths:
M llvm/lib/IR/Instruction.cpp
M llvm/test/DebugInfo/NVPTX/debug-addr-class.ll
M llvm/test/DebugInfo/NVPTX/debug-info.ll
M llvm/test/Transforms/SLPVectorizer/AArch64/spillcost-di.ll
M llvm/test/Transforms/SafeStack/X86/debug-loc2.ll
M llvm/unittests/IR/DebugInfoTest.cpp
Log Message:
-----------
[Instruction] Set metadata uses to undef on deletion
Summary:
Replace any extant metadata uses of a dying instruction with undef to
preserve debug info accuracy. Some alternatives include:
- Treat Instruction like any other Value, and point its extant metadata
uses to an empty ValueAsMetadata node. This makes extant dbg.value uses
trivially dead (i.e. fair game for deletion in many passes), leading to
stale dbg.values being in effect for too long.
- Call salvageDebugInfoOrMarkUndef. Not needed to make instruction removal
correct. OTOH results in wasted work in some common cases (e.g. when all
instructions in a BasicBlock are deleted).
This came up while discussing some basic cases in
https://reviews.llvm.org/D80052.
Reviewers: jmorse, TWeaver, aprantl, dexonsmith, jdoerfert
Subscribers: jholewinski, qcolombet, hiraditya, jfb, sstefan1, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80264
More information about the All-commits
mailing list