aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Analysis/LazyCallGraphTest.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2024-03-11 08:58:59 +0000
committerGitHub <noreply@github.com>2024-03-11 08:58:59 +0000
commitc9465e4771c93adfbc99ffca5963a48a5334d98d (patch)
treeabd2ffab3403ab519b8328fe2c96e452a13db2e1 /llvm/unittests/Analysis/LazyCallGraphTest.cpp
parentf1aa7837884c745ede497e365cc75d5581ecc714 (diff)
downloadllvm-c9465e4771c93adfbc99ffca5963a48a5334d98d.zip
llvm-c9465e4771c93adfbc99ffca5963a48a5334d98d.tar.gz
llvm-c9465e4771c93adfbc99ffca5963a48a5334d98d.tar.bz2
[DebugInfo][RemoveDIs] Assert if we mix PHIs and debug-info (#84054)
A potentially erroneous code construction with the work we've done to remove debug intrinsics, is inserting PHIs into blocks when the position hasn't been "sourced correctly". Specifically, if you have: %foo = PHI #dbg_value %bar = add i32... And plan on inserting a new PHI, you have to use the iterator form of `getFirstNonPHI` or getFirstInsertionPt (or begin()) to acquire an iterator that tells the debug-info maintenance code "this is supposed to be at the start of the block, put it in front of #dbg_value". We can detect call-sites that aren't doing this at runtime, and should do with this assertion. It might invalidate code that's doing something very unexpected, like walking backwards to find a PHI, then going forwards, then inserting: however that's just an inefficient way of calling `getFirstNonPHI`.
Diffstat (limited to 'llvm/unittests/Analysis/LazyCallGraphTest.cpp')
0 files changed, 0 insertions, 0 deletions