[llvm] 59e7de2 - [HWASan] remove replacement of DbgVariableIntrinsics.

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 11:41:09 PST 2022


Author: Florian Mayer
Date: 2022-02-15T11:40:58-08:00
New Revision: 59e7de26aaf51a6dca143858badd5d2b594f49e4

URL: https://github.com/llvm/llvm-project/commit/59e7de26aaf51a6dca143858badd5d2b594f49e4
DIFF: https://github.com/llvm/llvm-project/commit/59e7de26aaf51a6dca143858badd5d2b594f49e4.diff

LOG: [HWASan] remove replacement of DbgVariableIntrinsics.

This code was dead because we AI->replaceUsesWithIf above. I verified
this doesn't actually get run by applying
https://gist.github.com/fmayer/aea7cbb4700cfe2c9d932591ae1073c3 to the
Android toolchain and building AOSP, without any crash.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D119802

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
index 1c54955d34523..0d599733980f4 100644
--- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
@@ -1378,19 +1378,8 @@ bool HWAddressSanitizer::instrumentStack(
           II->eraseFromParent();
       }
     }
-    if (memtag::alignAndPadAlloca(Info, Align(Mapping.getObjectAlignment()))) {
-      for (auto DVI : Info.DbgVariableIntrinsics) {
-        SmallDenseSet<Value *> LocationOps(DVI->location_ops().begin(),
-                                           DVI->location_ops().end());
-        for (Value *V : LocationOps) {
-          if (auto *AI = dyn_cast_or_null<AllocaInst>(V)) {
-            if (V == AI)
-              DVI->replaceVariableLocationOp(V, Info.AI);
-          }
-        }
-      }
+    if (memtag::alignAndPadAlloca(Info, Align(Mapping.getObjectAlignment())))
       AI->eraseFromParent();
-    }
   }
   for (auto &I : SInfo.UnrecognizedLifetimes)
     I->eraseFromParent();


        


More information about the llvm-commits mailing list