1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/Transforms/Mem2Reg
Bjorn Pettersson df8cb658c8 Improve ConvertDebugDeclareToDebugValue
Summary:
This is a follow-up to r334830 and r335031.

In the valueCoversEntireFragment check we now also handle
the situation when there is a variable length array (VLA)
involved, and the length of the array has been reduced to
a constant.

The ConvertDebugDeclareToDebugValue functions that are related
to PHI nodes and load instructions now avoid inserting dbg.value
intrinsics when the value does not, for certain, cover the
variable/fragment that should be described.
In r334830 we assumed that the value always covered the entire
var/fragment and we had assertions in the code to show that
assumption. However, those asserts failed when compiling code
with VLAs, so we removed the asserts in r335031. Now when we
know that the valueCoversEntireFragment check can fail also for
PHI/Load instructions we avoid to insert the faulty dbg.value
intrinsic in such situations. Compared to the Store instruction
scenario we simply drop the dbg.value here (as the variable does
not change its value due to PHI/Load, so an earlier dbg.value
describing the variable should still be valid).

Reviewers: aprantl, vsk, efriedma

Reviewed By: aprantl

Subscribers: llvm-commits

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

llvm-svn: 335580
2018-06-26 06:17:00 +00:00
..
2002-03-28-UninitializedVal.ll
2002-05-01-ShouldNotPromoteThisAlloca.ll
2003-04-10-DFNotFound.ll
2003-04-18-DeadBlockProblem.ll
2003-04-24-MultipleIdenticalSuccessors.ll
2003-06-26-IterativePromote.ll
2003-10-05-DeadPHIInsertion.ll
2005-06-30-ReadBeforeWrite.ll
2005-11-28-Crash.ll
2007-08-27-VolatileLoadsStores.ll
atomic.ll
ConvertDebugInfo2.ll
ConvertDebugInfo.ll
crash.ll
dbg-addr-inline-dse.ll
dbg-addr.ll
dbg-inline-scope-for-phi.ll
debug-alloca-phi-2.ll Re-apply "[DebugInfo] Check size of variable in ConvertDebugDeclareToDebugValue" 2018-06-15 13:48:55 +00:00
debug-alloca-phi.ll
debug-alloca-vla-1.ll Improve ConvertDebugDeclareToDebugValue 2018-06-26 06:17:00 +00:00
debug-alloca-vla-2.ll Improve ConvertDebugDeclareToDebugValue 2018-06-26 06:17:00 +00:00
ignore-lifetime.ll
optnone.ll
pr24179.ll
pr37632-unreachable-list-of-stores.ll
preserve-nonnull-load-metadata.ll
PromoteMemToRegister.ll
UndefValuesMerge.ll