llvm-project/llvm/test
Bjorn Pettersson bec2a7c4eb [DebugInfo] Invalidate debug info in ReassociatePass::RewriteExprTree
Summary:
When Reassociate is rewriting an expression tree it may
reuse old binary expression nodes, for new expressions.
Whenever an expression node is reused, but with a non-trivial
change in the result, we need to invalidate any debug info
that is associated with the node.

If for example rewriting
  x = mul a, b
  y = mul c, x
into
  x = mul c, b
  y = mul a, x
we still get the same result for 'y', but 'x' is a new expression.
All debug info referring to 'x' must be invalidated (marked as
optimized out) since we no longer calculate the expected value.

As a side-effect this patch avoid (at least some) problems where
reassociate could end up creating IR with debug-use before def.
Earlier the dbg.value nodes where left untouched in the IR, while
the reused binary nodes where sinked to just before the root node
of the rewritten expression tree. See PR27273 for more info about
such problems.

Reviewers: dblaikie, aprantl, dexonsmith

Reviewed By: aprantl

Subscribers: JDevlieghere, llvm-commits

Tags: #debug-info

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

llvm-svn: 330804
2018-04-25 09:23:56 +00:00
..
Analysis [AArch64] Add cost model test case for transpose 2018-04-23 18:21:29 +00:00
Assembler
Bindings [LLVM-C] DIBuilder Bindings For Variable Expressions 2018-04-23 22:31:49 +00:00
Bitcode [bcanalyzer] Recognize more stream types 2018-04-21 23:52:04 +00:00
BugPoint
CodeGen [X86] Auto-generate complete checks. NFC 2018-04-25 03:40:45 +00:00
DebugInfo Fix path separator checks on Windows 2018-04-24 22:03:07 +00:00
Examples
ExecutionEngine [RuntimeDyld][PowerPC] Fix a newly added test in r329355 2018-04-09 14:29:23 +00:00
Feature Remove the LoopInstSimplify pass (-loop-instsimplify) 2018-03-12 20:49:42 +00:00
FileCheck
Instrumentation [HWASan] Introduce non-zero based and dynamic shadow memory (LLVM). 2018-04-20 20:04:04 +00:00
Integer
JitListener
LTO Object: Don't mark alias unconditionally defined 2018-04-10 00:53:16 +00:00
Linker [llvm-link] Use WithColor for printing errors 2018-04-18 14:41:47 +00:00
MC Reland "[mips] Guard traps for microMIPS correctly" 2018-04-24 17:11:37 +00:00
Object [WebAssembly] Use section index in relocation section header 2018-04-24 18:11:36 +00:00
ObjectYAML [WebAssembly] libObject: Don't include the name the size of custom sections 2018-04-12 20:31:12 +00:00
Other [lit] Fix several Python 2/3 compatibility issues and tests 2018-04-07 00:21:28 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen TableGen: Support Intrinsic values in SearchableTable 2018-04-01 17:08:58 +00:00
ThinLTO/X86 [lit] Fix several Python 2/3 compatibility issues and tests 2018-04-07 00:21:28 +00:00
Transforms [DebugInfo] Invalidate debug info in ReassociatePass::RewriteExprTree 2018-04-25 09:23:56 +00:00
Unit
Verifier Tweak an assert message in the verifier 2018-04-06 10:20:19 +00:00
YAMLParser
tools [X86] Split off PHMINPOSUW to their own schedule class 2018-04-24 18:49:25 +00:00
.clang-format
CMakeLists.txt Sort a target list a bit better. 2018-04-23 14:28:49 +00:00
TestRunner.sh
lit.cfg.py Enable debug fission for thinLTO linked via gold-plugin 2018-04-13 05:03:28 +00:00
lit.site.cfg.py.in