diff options
author | Vedant Kumar <vsk@apple.com> | 2020-05-19 18:03:22 -0700 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2020-05-21 15:58:12 -0700 |
commit | 77ffce6954470018de1748d33f9ac6aa66121e9f (patch) | |
tree | 8739a875082f10e2cd53c930edc5188331d8abff /clang/lib/CodeGen/CodeGenFunction.h | |
parent | bf242c067eaf8041a3505e115e0a827f28e4451a (diff) | |
download | llvm-77ffce6954470018de1748d33f9ac6aa66121e9f.zip llvm-77ffce6954470018de1748d33f9ac6aa66121e9f.tar.gz llvm-77ffce6954470018de1748d33f9ac6aa66121e9f.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
0 files changed, 0 insertions, 0 deletions