[all-commits] [llvm/llvm-project] bf45c3: [DSE] Delay deleting non-memory-defs until end of ...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Mon Mar 11 12:53:57 PDT 2024
Branch: refs/heads/release/18.x
Home: https://github.com/llvm/llvm-project
Commit: bf45c3a07918c14577ef7a829f16ec339b9ed610
https://github.com/llvm/llvm-project/commit/bf45c3a07918c14577ef7a829f16ec339b9ed610
Author: Florian Hahn <flo at fhahn.com>
Date: 2024-03-11 (Mon, 11 Mar 2024)
Changed paths:
M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
A llvm/test/Transforms/DeadStoreElimination/batchaa-caching-new-pointers.ll
Log Message:
-----------
[DSE] Delay deleting non-memory-defs until end of DSE. (#83411)
DSE uses BatchAA, which caches queries using pairs of MemoryLocations.
At the moment, DSE may remove instructions that are used as pointers in
cached MemoryLocations. If a new instruction used by a new MemoryLoation
and this instruction gets allocated at the same address as a previosuly
cached and then removed instruction, we may access an incorrect entry in
the cache.
To avoid this delay removing all instructions except MemoryDefs until
the end of DSE. This should avoid removing any values used in BatchAA's
cache.
Test case by @vporpo from
https://github.com/llvm/llvm-project/pull/83181.
(Test not precommitted because the results are non-determinstic - memset
only sometimes gets removed)
PR: https://github.com/llvm/llvm-project/pull/83411
(cherry picked from commit 10f5e983a9e3162a569cbebeb32168716e391340)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list