Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions llvm/lib/IR/DebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2200,6 +2200,10 @@ bool AssignmentTrackingPass::runOnFunction(Function &F) {
if (F.hasFnAttribute(Attribute::OptimizeNone))
return /*Changed*/ false;

// FIXME: https://github.com/llvm/llvm-project/issues/76545
if (F.hasFnAttribute(Attribute::SanitizeHWAddress))
return /*Changed*/ false;

bool Changed = false;
auto *DL = &F.getParent()->getDataLayout();
// Collect a map of {backing storage : dbg.declares} (currently "backing
Expand Down
5 changes: 0 additions & 5 deletions llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1435,11 +1435,6 @@ bool HWAddressSanitizer::instrumentStack(memtag::StackInfo &SInfo,
if (DDI->getVariableLocationOp(LocNo) == AI)
DDI->setExpression(DIExpression::appendOpsToArg(DDI->getExpression(),
NewOps, LocNo));
if (auto *DAI = dyn_cast<DbgAssignIntrinsic>(DDI)) {
if (DAI->getAddress() == AI)
DAI->setAddressExpression(
DIExpression::prependOpcodes(DDI->getExpression(), NewOps));
}
}

auto TagEnd = [&](Instruction *Node) {
Expand Down
10 changes: 3 additions & 7 deletions llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,16 @@ void StackInfoBuilder::visit(Instruction &Inst) {
return;
}
if (auto *DVI = dyn_cast<DbgVariableIntrinsic>(&Inst)) {
auto AddIfInteresting = [&](Value *V) {
for (Value *V : DVI->location_ops()) {
if (auto *AI = dyn_cast_or_null<AllocaInst>(V)) {
if (!isInterestingAlloca(*AI))
return;
continue;
AllocaInfo &AInfo = Info.AllocasToInstrument[AI];
auto &DVIVec = AInfo.DbgVariableIntrinsics;
if (DVIVec.empty() || DVIVec.back() != DVI)
DVIVec.push_back(DVI);
}
};
for (Value *V : DVI->location_ops())
AddIfInteresting(V);
if (auto *DAI = dyn_cast<DbgAssignIntrinsic>(DVI))
AddIfInteresting(DAI->getAddress());
}
}
Instruction *ExitUntag = getUntagLocationIfFunctionExit(Inst);
if (ExitUntag)
Expand Down
71 changes: 0 additions & 71 deletions llvm/test/CodeGen/AArch64/dbg-assign-tag-offset-mix-loc.ll

This file was deleted.

71 changes: 0 additions & 71 deletions llvm/test/CodeGen/AArch64/dbg-assign-tag-offset.ll

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; RUN: opt %s -S -passes=declare-to-assign -o - | FileCheck %s

; CHECK: call void @llvm.dbg.assign
; CHECK: call void @llvm.dbg.declare

define dso_local void @f() sanitize_hwaddress !dbg !9 {
entry:
Expand Down

This file was deleted.