llvm-project/llvm/test/Instrumentation
Vedant Kumar 8e77b33b3c [Local] Do not move around dbg.declares during replaceDbgDeclare
replaceDbgDeclare is used to update the descriptions of stack variables
when they are moved (e.g. by ASan or SafeStack). A side effect of
replaceDbgDeclare is that it moves dbg.declares around in the
instruction stream (typically by hoisting them into the entry block).
This behavior was introduced in llvm/r227544 to fix an assertion failure
(llvm.org/PR22386), but no longer appears to be necessary.

Hoisting a dbg.declare generally does not create problems. Usually,
dbg.declare either describes an argument or an alloca in the entry
block, and backends have special handling to emit locations for these.
In optimized builds, LowerDbgDeclare places dbg.values in the right
spots regardless of where the dbg.declare is. And no one uses
replaceDbgDeclare to handle things like VLAs.

However, there doesn't seem to be a positive case for moving
dbg.declares around anymore, and this reordering can get in the way of
understanding other bugs. I propose getting rid of it.

Testing: stage2 RelWithDebInfo sanitized build, check-llvm

rdar://59397340

Differential Revision: https://reviews.llvm.org/D74517
2020-02-13 14:35:02 -08:00
..
AddressSanitizer [Local] Do not move around dbg.declares during replaceDbgDeclare 2020-02-13 14:35:02 -08:00
BoundsChecking Revert "[IRBuilder] Fold consistently for or/and whether constant is LHS or RHS" 2019-07-07 22:12:01 +00:00
DataFlowSanitizer Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
HWAddressSanitizer hwasan: Move .note.hwasan.globals note to hwasan.module_ctor comdat. 2020-01-17 13:40:52 -08:00
InstrOrderFile Add a module pass for order file instrumentation 2019-02-28 20:13:38 +00:00
InstrProfiling [Instrumentation] Set hidden visibility for the bias variable 2020-01-28 12:07:03 -08:00
MemorySanitizer [msan] Instrument x86.pclmulqdq* intrinsics. 2020-01-24 14:31:06 -08:00
PoisonChecking [PoisonCheker] Support for out of bounds operands on shifts + insert/extractelement 2019-07-09 19:26:12 +00:00
SanitizerCoverage Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
ThreadSanitizer Insert module constructors in a module pass 2019-10-11 08:47:03 +00:00
cgprofile.ll [BFI] Use rounding while computing profile counts. 2018-08-16 00:26:59 +00:00