llvm-project/llvm/unittests/Transforms/Utils
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
..
ASanStackFrameLayoutTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BasicBlockUtilsTest.cpp [Utils] Extract EliminateUnreachableBlocks (NFC) 2019-03-11 17:51:57 +00:00
CMakeLists.txt [CallPromotionUtils] Add tryPromoteCall. 2020-02-10 13:43:16 -08:00
CallPromotionUtilsTest.cpp [CallPromotionUtils] Add tryPromoteCall. 2020-02-10 13:43:16 -08:00
CloningTest.cpp reland "[DebugInfo] Support to emit debugInfo for extern variables" 2019-12-22 18:28:50 -08:00
CodeExtractorTest.cpp [CodeExtractor] Remove stale llvm.assume calls from extracted region 2020-01-28 17:18:01 -08:00
CodeMoverUtilsTest.cpp [CodeMoverUtils] Improve IsControlFlowEquivalent. 2020-01-28 14:18:00 +00:00
FunctionComparatorTest.cpp [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
IntegerDivisionTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LocalTest.cpp [Local] Do not move around dbg.declares during replaceDbgDeclare 2020-02-13 14:35:02 -08:00
LoopRotationUtilsTest.cpp [LoopRotate] add ability to repeat loop rotation until non-deoptimizing exit is found 2020-01-23 15:56:24 +03:00
LoopUtilsTest.cpp [LoopUtils] Updated deleteDeadLoop() to handle loop nest. 2019-12-18 15:59:45 +00:00
SSAUpdaterBulkTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SizeOptsTest.cpp [PGO][PGSO] Distinguish queries from unit tests and explicitly enable for the existing IR passes only. NFC. 2019-12-04 09:35:50 -08:00
UnrollLoopTest.cpp [SCEV] Add option to forget everything in SCEV. 2019-04-12 19:16:07 +00:00
VFABIUtils.cpp [VFABI] Remove unused variables in testcase, fix buildbot 2019-11-12 08:28:12 +01:00
ValueMapperTest.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00