[clang] [llvm] [DSE] Make DSE eliminate stores to objects with a sized dead_on_return (PR #173694)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 23 02:19:46 PST 2026


================
@@ -1206,10 +1217,23 @@ struct DSEState {
     return OW_None;
   }
 
-  bool isInvisibleToCallerAfterRet(const Value *V) {
+  bool isInvisibleToCallerAfterRet(const Value *V, const Value *Ptr,
+                                   const LocationSize StoreSize) {
     if (isa<AllocaInst>(V))
       return true;
 
+    if (InvisibleToCallerAfterRetBounded.contains(V)) {
----------------
nikic wrote:

Use find() here instead of doing another lookup below?

https://github.com/llvm/llvm-project/pull/173694


More information about the cfe-commits mailing list