aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorOrlando Cazalet-Hyams <orlando.hyams@sony.com>2025-07-25 15:18:12 +0100
committerGitHub <noreply@github.com>2025-07-25 15:18:12 +0100
commitc1545b68bcba16c3d21fd3d0ee3bc4c92aa8d98f (patch)
tree25ad007310442e6a56cdb1495764e4a3140acc7f /clang/lib/Frontend/CompilerInstance.cpp
parent73272d6fc67ee2c12947912ac50727bde38cb3a3 (diff)
downloadllvm-c1545b68bcba16c3d21fd3d0ee3bc4c92aa8d98f.zip
llvm-c1545b68bcba16c3d21fd3d0ee3bc4c92aa8d98f.tar.gz
llvm-c1545b68bcba16c3d21fd3d0ee3bc4c92aa8d98f.tar.bz2
Reapply [BranchFolding] Kill common hoisted debug instructions (#149999)
Reapply #140091. branch-folder hoists common instructions from TBB and FBB into their pred. Without this patch it achieves this by splicing the instructions from TBB and deleting the common ones in FBB. That moves the debug locations and debug instructions from TBB into the pred without modification, which is not ideal. Debug locations are handled in #140063. This patch handles debug instructions - in the simplest way possible, which is to just kill (undef) them. We kill and hoist the ones in FBB as well as TBB because otherwise the fact there's an assignment on the code path is deleted (which might lead to a prior location extending further than it should). There's possibly something we could do to preserve some variable locations in some cases, but this is the easiest not-incorrect thing to do. Note I had to replace the constant DBG_VALUEs to use registers in the test- it turns out setDebugValueUndef doesn't undef constant DBG_VALUEs... which feels wrong to me, but isn't something I want to touch right now.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
0 files changed, 0 insertions, 0 deletions