[llvm] 07af01c - [Attributor] Remove dead function getKnownConstantRange (#221897)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 07:50:46 PDT 2026
Author: Kazu Hirata
Date: 2026-09-08T07:50:39-07:00
New Revision: 07af01c0f9e55599c4b8e11ad14851d2ef5d01fe
URL: https://github.com/llvm/llvm-project/commit/07af01c0f9e55599c4b8e11ad14851d2ef5d01fe
DIFF: https://github.com/llvm/llvm-project/commit/07af01c0f9e55599c4b8e11ad14851d2ef5d01fe.diff
LOG: [Attributor] Remove dead function getKnownConstantRange (#221897)
getKnownConstantRange was added on January 15, 2020 in commit
188f9a348dc545bf9a420d998ad37761bddd7285 without any callers and has
been unused since.
Added:
Modified:
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index 6e4d3d92d8106..00b20eee4d5df 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -4941,12 +4941,6 @@ struct AAValueConstantRange
getAssumedConstantRange(Attributor &A,
const Instruction *CtxI = nullptr) const = 0;
- /// Return a known range for the associated value at a program point \p CtxI.
- /// If \p I is nullptr, simply return a known range.
- virtual ConstantRange
- getKnownConstantRange(Attributor &A,
- const Instruction *CtxI = nullptr) const = 0;
-
/// Return an assumed constant for the associated value a program point \p
/// CtxI.
std::optional<Constant *>
diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index 8d16f49525ca8..223ddc5c217b5 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -9247,19 +9247,6 @@ struct AAValueConstantRangeImpl : AAValueConstantRange {
return true;
}
- /// See AAValueConstantRange::getKnownConstantRange(..).
- ConstantRange
- getKnownConstantRange(Attributor &A,
- const Instruction *CtxI = nullptr) const override {
- if (!isValidCtxInstructionForOutsideAnalysis(A, CtxI,
- /* AllowAACtxI */ false))
- return getKnown();
-
- ConstantRange LVIR = getConstantRangeFromLVI(A, CtxI);
- ConstantRange SCEVR = getConstantRangeFromSCEV(A, CtxI);
- return getKnown().intersectWith(SCEVR).intersectWith(LVIR);
- }
-
/// See AAValueConstantRange::getAssumedConstantRange(..).
ConstantRange
getAssumedConstantRange(Attributor &A,
More information about the llvm-commits
mailing list