aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Program.cpp
diff options
context:
space:
mode:
authorJameson Nash <vtjnash@gmail.com>2025-06-20 10:32:31 -0400
committerGitHub <noreply@github.com>2025-06-20 10:32:31 -0400
commit96ab74bf175f46de4b6fbfc68deecd3567e42a52 (patch)
tree3e383401220c8c62c56bf071090cee1380a7aff9 /clang/lib/AST/ByteCode/Program.cpp
parentf242360e156b407902829d694c036b2d22211894 (diff)
downloadllvm-96ab74bf175f46de4b6fbfc68deecd3567e42a52.zip
llvm-96ab74bf175f46de4b6fbfc68deecd3567e42a52.tar.gz
llvm-96ab74bf175f46de4b6fbfc68deecd3567e42a52.tar.bz2
[InstCombine] remove undef loads, such as memcpy from undef (#143958)
Extend `isAllocSiteRemovable` to be able to check if the ModRef info indicates the alloca is only Ref or only Mod, and be able to remove it accordingly. It seemed that there were a surprising number of benchmarks with this pattern which weren't getting optimized previously (due to MemorySSA walk limits). There were somewhat more existing tests than I'd like to have modified which were simply doing exactly this pattern (and thus relying on undef memory). Claude code contributed the new tests (and found an important typo that I'd made). This implements the discussion in https://github.com/llvm/llvm-project/pull/143782#discussion_r2142720376.
Diffstat (limited to 'clang/lib/AST/ByteCode/Program.cpp')
0 files changed, 0 insertions, 0 deletions