From 59e7de26aaf51a6dca143858badd5d2b594f49e4 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Mon, 14 Feb 2022 18:25:45 -0800 Subject: [PATCH] [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 --- llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp index 1c54955..0d59973 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 LocationOps(DVI->location_ops().begin(), - DVI->location_ops().end()); - for (Value *V : LocationOps) { - if (auto *AI = dyn_cast_or_null(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(); -- 2.7.4