[llvm] [DA] Add static to analyzeCoefficientsForGCD (NFC) (PR #190172)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 06:19:55 PDT 2026


https://github.com/kasuga-fj created https://github.com/llvm/llvm-project/pull/190172

None

>From 0fafc30285b27a42ce99d8380a2be64ddbeb5ea1 Mon Sep 17 00:00:00 2001
From: Ryotaro Kasuga <kasuga.ryotaro at fujitsu.com>
Date: Thu, 2 Apr 2026 13:05:18 +0000
Subject: [PATCH] [DA] Add static to analyzeCoefficientsForGCD

---
 llvm/lib/Analysis/DependenceAnalysis.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp
index c8f33f394f047..c2b67b43dc92e 100644
--- a/llvm/lib/Analysis/DependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DependenceAnalysis.cpp
@@ -2177,8 +2177,9 @@ bool DependenceInfo::accumulateCoefficientsGCD(const SCEV *Expr,
 /// Compute \p RunningGCD and return the start value of the innermost
 /// \p SCEVAddRecExpr. In order to calculate the return value we do not
 /// return immediately if it is proved that \p RunningGCD = 1.
-const SCEV *analyzeCoefficientsForGCD(const SCEV *Coefficients,
-                                      APInt &RunningGCD, ScalarEvolution *SE) {
+static const SCEV *analyzeCoefficientsForGCD(const SCEV *Coefficients,
+                                             APInt &RunningGCD,
+                                             ScalarEvolution *SE) {
   while (const SCEVAddRecExpr *AddRec =
              dyn_cast<SCEVAddRecExpr>(Coefficients)) {
     const SCEV *Coeff = AddRec->getStepRecurrence(*SE);



More information about the llvm-commits mailing list