From d7fcbf17d3cff183b72f2334dce7953bce6807b3 Mon Sep 17 00:00:00 2001 From: Ryotaro Kasuga Date: Thu, 11 Dec 2025 11:13:35 +0000 Subject: [PATCH] [DA] Remove `DependenceInfo::removeMatchingExtensions` --- .../llvm/Analysis/DependenceAnalysis.h | 6 ------ llvm/lib/Analysis/DependenceAnalysis.cpp | 21 ------------------- 2 files changed, 27 deletions(-) diff --git a/llvm/include/llvm/Analysis/DependenceAnalysis.h b/llvm/include/llvm/Analysis/DependenceAnalysis.h index 6dec24fc9f104..d8dfeb7f055ad 100644 --- a/llvm/include/llvm/Analysis/DependenceAnalysis.h +++ b/llvm/include/llvm/Analysis/DependenceAnalysis.h @@ -478,12 +478,6 @@ class DependenceInfo { /// array subscripts are signed. void unifySubscriptType(ArrayRef Pairs); - /// removeMatchingExtensions - Examines a subscript pair. - /// If the source and destination are identically sign (or zero) - /// extended, it strips off the extension in an effort to - /// simplify the actual analysis. - void removeMatchingExtensions(Subscript *Pair); - /// collectCommonLoops - Finds the set of loops from the LoopNest that /// have a level <= CommonLevels and are referred to by the SCEV Expression. void collectCommonLoops(const SCEV *Expression, const Loop *LoopNest, diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp index 9b9c80a9b3266..e3a0da964a3b3 100644 --- a/llvm/lib/Analysis/DependenceAnalysis.cpp +++ b/llvm/lib/Analysis/DependenceAnalysis.cpp @@ -1030,26 +1030,6 @@ void DependenceInfo::unifySubscriptType(ArrayRef Pairs) { } } -// removeMatchingExtensions - Examines a subscript pair. -// If the source and destination are identically sign (or zero) -// extended, it strips off the extension in an effect to simplify -// the actual analysis. -void DependenceInfo::removeMatchingExtensions(Subscript *Pair) { - const SCEV *Src = Pair->Src; - const SCEV *Dst = Pair->Dst; - if ((isa(Src) && isa(Dst)) || - (isa(Src) && isa(Dst))) { - const SCEVIntegralCastExpr *SrcCast = cast(Src); - const SCEVIntegralCastExpr *DstCast = cast(Dst); - const SCEV *SrcCastOp = SrcCast->getOperand(); - const SCEV *DstCastOp = DstCast->getOperand(); - if (SrcCastOp->getType() == DstCastOp->getType()) { - Pair->Src = SrcCastOp; - Pair->Dst = DstCastOp; - } - } -} - // Examine the scev and return true iff it's affine. // Collect any loops mentioned in the set of "Loops". bool DependenceInfo::checkSubscript(const SCEV *Expr, const Loop *LoopNest, @@ -3556,7 +3536,6 @@ DependenceInfo::depends(Instruction *Src, Instruction *Dst, Pair[P].Loops.resize(MaxLevels + 1); Pair[P].GroupLoops.resize(MaxLevels + 1); Pair[P].Group.resize(Pairs); - removeMatchingExtensions(&Pair[P]); Pair[P].Classification = classifyPair(Pair[P].Src, LI->getLoopFor(Src->getParent()), Pair[P].Dst, LI->getLoopFor(Dst->getParent()), Pair[P].Loops);