[llvm] da45b6c - [RemoveDIs][NFC] Remove dbg intrinsic version of calculateFragmentIntersect (#153378)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 19 05:44:27 PDT 2025
Author: Orlando Cazalet-Hyams
Date: 2025-08-19T13:44:25+01:00
New Revision: da45b6c71d417882f930703c6f9d245fb5968aeb
URL: https://github.com/llvm/llvm-project/commit/da45b6c71d417882f930703c6f9d245fb5968aeb
DIFF: https://github.com/llvm/llvm-project/commit/da45b6c71d417882f930703c6f9d245fb5968aeb.diff
LOG: [RemoveDIs][NFC] Remove dbg intrinsic version of calculateFragmentIntersect (#153378)
Added:
Modified:
llvm/include/llvm/IR/DebugInfo.h
llvm/lib/IR/DebugInfo.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/DebugInfo.h b/llvm/include/llvm/IR/DebugInfo.h
index cc9e7b0c77bdd..220e4c1cad4f7 100644
--- a/llvm/include/llvm/IR/DebugInfo.h
+++ b/llvm/include/llvm/IR/DebugInfo.h
@@ -223,11 +223,6 @@ LLVM_ABI void deleteAll(Function *F);
///
/// Result contains a zero-sized fragment if there's no intersect.
LLVM_ABI bool
-calculateFragmentIntersect(const DataLayout &DL, const Value *Dest,
- uint64_t SliceOffsetInBits, uint64_t SliceSizeInBits,
- const DbgAssignIntrinsic *DbgAssign,
- std::optional<DIExpression::FragmentInfo> &Result);
-LLVM_ABI bool
calculateFragmentIntersect(const DataLayout &DL, const Value *Dest,
uint64_t SliceOffsetInBits, uint64_t SliceSizeInBits,
const DbgVariableRecord *DVRAssign,
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index e9425e1fabd5d..8e523bcf7960e 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -1927,12 +1927,9 @@ void at::deleteAll(Function *F) {
}
}
-/// FIXME: Remove this wrapper function and call
-/// DIExpression::calculateFragmentIntersect directly.
-template <typename T>
-bool calculateFragmentIntersectImpl(
+bool at::calculateFragmentIntersect(
const DataLayout &DL, const Value *Dest, uint64_t SliceOffsetInBits,
- uint64_t SliceSizeInBits, const T *AssignRecord,
+ uint64_t SliceSizeInBits, const DbgVariableRecord *AssignRecord,
std::optional<DIExpression::FragmentInfo> &Result) {
// No overlap if this DbgRecord describes a killed location.
if (AssignRecord->isKillAddress())
@@ -1961,26 +1958,6 @@ bool calculateFragmentIntersectImpl(
BitExtractOffsetInBits, VarFrag, Result, OffsetFromLocationInBits);
}
-/// FIXME: Remove this wrapper function and call
-/// DIExpression::calculateFragmentIntersect directly.
-bool at::calculateFragmentIntersect(
- const DataLayout &DL, const Value *Dest, uint64_t SliceOffsetInBits,
- uint64_t SliceSizeInBits, const DbgAssignIntrinsic *DbgAssign,
- std::optional<DIExpression::FragmentInfo> &Result) {
- return calculateFragmentIntersectImpl(DL, Dest, SliceOffsetInBits,
- SliceSizeInBits, DbgAssign, Result);
-}
-
-/// FIXME: Remove this wrapper function and call
-/// DIExpression::calculateFragmentIntersect directly.
-bool at::calculateFragmentIntersect(
- const DataLayout &DL, const Value *Dest, uint64_t SliceOffsetInBits,
- uint64_t SliceSizeInBits, const DbgVariableRecord *DVRAssign,
- std::optional<DIExpression::FragmentInfo> &Result) {
- return calculateFragmentIntersectImpl(DL, Dest, SliceOffsetInBits,
- SliceSizeInBits, DVRAssign, Result);
-}
-
/// Update inlined instructions' DIAssignID metadata. We need to do this
/// otherwise a function inlined more than once into the same function
/// will cause DIAssignID to be shared by many instructions.
More information about the llvm-commits
mailing list