llvm-project/llvm/test
David Stenberg 2474ce5862 [DeadArgElim] Fixes for dbg.values using dead arg/return values
Summary:
When eliminating a dead argument or return value in a function with
local linkage, all uses, including in dbg.value intrinsics, would be
replaced with null constants. This would mean that, for example for an
integer argument, the debug info would incorrectly express that the
value is 0. Instead, replace all uses with undef to indicate that the
argument/return value is optimized out.

Also, make sure that metadata uses of return values are rewritten even
if there are no non-metadata uses of the value.

As a bit of historical curiosity, the code that emitted null constants
was introduced in the initial check-in of the pass in 2003, before
'undef' values even existed in LLVM.

This fixes PR23260.

Reviewers: dblaikie, aprantl, vsk, djtodoro

Reviewed By: aprantl

Subscribers: llvm-commits

Tags: #debug-info

Differential Revision: https://reviews.llvm.org/D55513

llvm-svn: 348837
2018-12-11 10:33:38 +00:00
..
Analysis Cleanup test case by removing unused attribute dso_local 2018-12-11 09:32:49 +00:00
Assembler [IR] Don't assume all functions are 4 byte aligned 2018-12-07 08:34:59 +00:00
Bindings [DebugInfo] IR/Bitcode changes for DISubprogram flags. 2018-11-28 21:14:32 +00:00
Bitcode [ThinLTO] Allow importing of functions with var args 2018-12-01 05:11:46 +00:00
BugPoint [bugpoint] Find 'opt', etc., in bugpoint directory 2018-12-10 00:56:13 +00:00
CodeGen [X86] Switch the 64-bit mulx schedule test to use inline assembly. 2018-12-11 07:41:06 +00:00
DebugInfo debuginfo: Use symbol difference for CU length to simplify assembly reading/editing 2018-12-10 22:44:48 +00:00
Demangle [MS Demangler] Print public:, protected:, private: if set in FunctionClass or a variable's StorageClass. 2018-11-13 20:18:26 +00:00
Examples
ExecutionEngine [ExecutionEngine][Interpreter] Fix out-of-bounds array access. 2018-11-20 01:01:26 +00:00
Feature Mark @llvm.trap cold 2018-11-14 19:53:41 +00:00
FileCheck [FileCheck] introduce CHECK-COUNT-<num> repetition directive 2018-11-13 00:46:13 +00:00
Instrumentation [asan] Split -asan-use-private-alias to -asan-use-odr-indicator 2018-12-04 23:17:41 +00:00
Integer
JitListener
LTO LTO: Don't internalize available_externally globals. 2018-12-05 00:09:36 +00:00
Linker [DebugInfo] IR/Bitcode changes for DISubprogram flags. 2018-11-28 21:14:32 +00:00
MC [WebAssembly] Add '.eventtype' directive support 2018-12-11 01:11:04 +00:00
Object AMDGPU: Enable code object v3 for AMDHSA only 2018-11-15 02:32:43 +00:00
ObjectYAML [WebAssembly] Add support for dylink section in object format 2018-11-14 18:36:24 +00:00
Other Fixing -print-module-scope for legacy SCC passes 2018-12-03 14:48:15 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen [TableGen] Preserve order of output operands in DAGISelMatcherGen 2018-12-05 00:47:59 +00:00
ThinLTO/X86 ThinLTO: Do not import debug info for imported global constants 2018-12-05 21:42:17 +00:00
Transforms [DeadArgElim] Fixes for dbg.values using dead arg/return values 2018-12-11 10:33:38 +00:00
Unit
Verifier [GlobalISel] Introduce G_BUILD_VECTOR, G_BUILD_VECTOR_TRUNC and G_CONCAT_VECTOR opcodes. 2018-12-05 23:53:30 +00:00
YAMLParser
tools [AArch64] Refactor the Exynos scheduling predicates 2018-12-10 17:17:26 +00:00
.clang-format
CMakeLists.txt
TestRunner.sh
lit.cfg.py
lit.site.cfg.py.in