[llvm] [RemoveDIs][NFC] Remove dbg intrinsic version of calculateFragmentIntersect (PR #153378)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 19 02:32:15 PDT 2025
https://github.com/OCHyams updated https://github.com/llvm/llvm-project/pull/153378
>From 67f4d6b41076b12b7b6b45b63bb897590ea7e77e Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
Date: Wed, 13 Aug 2025 10:53:37 +0100
Subject: [PATCH] [RemoveDIs][NFC] Remove dbg intrinsic version of
calculateFragmentIntersect
---
llvm/include/llvm/IR/DebugInfo.h | 5 -----
llvm/lib/IR/DebugInfo.cpp | 27 ++-------------------------
2 files changed, 2 insertions(+), 30 deletions(-)
diff --git a/llvm/include/llvm/IR/DebugInfo.h b/llvm/include/llvm/IR/DebugInfo.h
index c529a86309a94..65d9b8b0a3bed 100644
--- a/llvm/include/llvm/IR/DebugInfo.h
+++ b/llvm/include/llvm/IR/DebugInfo.h
@@ -253,11 +253,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 ab8ecee2a81e0..6ce06442e396c 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -1955,12 +1955,9 @@ void at::deleteAll(Function *F) {
DVR->eraseFromParent();
}
-/// 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())
@@ -1989,26 +1986,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