When moving unsafe allocas to the unsafe stack, dbg.declare intrinsics are
updated to refer to the new location.
This change does the same to dbg.value intrinsics.
| Paths 
 |  Differential  D20986  
[safestack] Fixup llvm.dbg.value when rewriting unsafe allocas. ClosedPublic Authored by eugenis on Jun 3 2016, 2:09 PM. 
Details 
 Summary When moving unsafe allocas to the unsafe stack, dbg.declare intrinsics are This change does the same to dbg.value intrinsics. 
Diff Detail 
 Event TimelineComment Actions Can you also add a test case for dynamic alloca? It looks like the same thing could also be done for ASan (but that can be a separate change). 
 Comment Actions 
 Done. I've noticed that this call with Offset=0 does not do anything so I removed it. 
 
 eugenis marked 4 inline comments as done.Comment Actions debug-loc2.ll test extended to cover the two negative cases. This revision is now accepted and ready to land.Jun 16 2016, 3:39 PM 
Revision Contents 
 
Diff 59620 include/llvm/Transforms/Utils/Local.h
 lib/CodeGen/SafeStack.cpp
 lib/Transforms/Utils/Local.cpp
 test/Transforms/SafeStack/debug-loc2.ll
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This won't terminate if there are any non-llvm.dbg.value uses of the value (or if replaceOneDbgValueForAlloca gives up).