[llvm] b80fa58 - [NFC][hwasan] Rename local variable
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 31 12:26:12 PDT 2023
Author: Vitaly Buka
Date: 2023-08-31T12:25:46-07:00
New Revision: b80fa58bdc54d80d7482549f9d17106c6f544a16
URL: https://github.com/llvm/llvm-project/commit/b80fa58bdc54d80d7482549f9d17106c6f544a16
DIFF: https://github.com/llvm/llvm-project/commit/b80fa58bdc54d80d7482549f9d17106c6f544a16.diff
LOG: [NFC][hwasan] Rename local variable
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 a11e5016c71644..7c9ab4e51436fb 100644
--- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
@@ -892,33 +892,33 @@ void HWAddressSanitizer::instrumentMemAccessInline(Value *Ptr, bool IsWrite,
TagMismatch = IRB.CreateAnd(TagMismatch, TagNotIgnored);
}
- Instruction *CheckTerm =
+ Instruction *TagMismatchTerm =
SplitBlockAndInsertIfThen(TagMismatch, InsertBefore, false,
MDBuilder(*C).createBranchWeights(1, 100000));
- IRB.SetInsertPoint(CheckTerm);
+ IRB.SetInsertPoint(TagMismatchTerm);
Value *OutOfShortGranuleTagRange =
IRB.CreateICmpUGT(MemTag, ConstantInt::get(Int8Ty, 15));
- Instruction *CheckFailTerm =
- SplitBlockAndInsertIfThen(OutOfShortGranuleTagRange, CheckTerm, !Recover,
- MDBuilder(*C).createBranchWeights(1, 100000));
+ Instruction *CheckFailTerm = SplitBlockAndInsertIfThen(
+ OutOfShortGranuleTagRange, TagMismatchTerm, !Recover,
+ MDBuilder(*C).createBranchWeights(1, 100000));
- IRB.SetInsertPoint(CheckTerm);
+ IRB.SetInsertPoint(TagMismatchTerm);
Value *PtrLowBits = IRB.CreateTrunc(IRB.CreateAnd(PtrLong, 15), Int8Ty);
PtrLowBits = IRB.CreateAdd(
PtrLowBits, ConstantInt::get(Int8Ty, (1 << AccessSizeIndex) - 1));
Value *PtrLowBitsOOB = IRB.CreateICmpUGE(PtrLowBits, MemTag);
- SplitBlockAndInsertIfThen(PtrLowBitsOOB, CheckTerm, false,
+ SplitBlockAndInsertIfThen(PtrLowBitsOOB, TagMismatchTerm, false,
MDBuilder(*C).createBranchWeights(1, 100000),
(DomTreeUpdater *)nullptr, nullptr,
CheckFailTerm->getParent());
- IRB.SetInsertPoint(CheckTerm);
+ IRB.SetInsertPoint(TagMismatchTerm);
Value *InlineTagAddr = IRB.CreateOr(AddrLong, 15);
InlineTagAddr = IRB.CreateIntToPtr(InlineTagAddr, Int8PtrTy);
Value *InlineTag = IRB.CreateLoad(Int8Ty, InlineTagAddr);
Value *InlineTagMismatch = IRB.CreateICmpNE(PtrTag, InlineTag);
- SplitBlockAndInsertIfThen(InlineTagMismatch, CheckTerm, false,
+ SplitBlockAndInsertIfThen(InlineTagMismatch, TagMismatchTerm, false,
MDBuilder(*C).createBranchWeights(1, 100000),
(DomTreeUpdater *)nullptr, nullptr,
CheckFailTerm->getParent());
@@ -959,7 +959,8 @@ void HWAddressSanitizer::instrumentMemAccessInline(Value *Ptr, bool IsWrite,
}
IRB.CreateCall(Asm, PtrLong);
if (Recover)
- cast<BranchInst>(CheckFailTerm)->setSuccessor(0, CheckTerm->getParent());
+ cast<BranchInst>(CheckFailTerm)
+ ->setSuccessor(0, TagMismatchTerm->getParent());
}
bool HWAddressSanitizer::ignoreMemIntrinsic(MemIntrinsic *MI) {
More information about the llvm-commits
mailing list