[polly] [polly] Drop const from return types (NFC) (PR #140837)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue May 20 19:54:50 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/140837
None
>From 686b23bcc790a1ff3f5c27c717295ab956a67066 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 20 May 2025 15:42:35 -0700
Subject: [PATCH] [polly] Drop const from return types (NFC)
---
polly/include/polly/CodeGen/IslNodeBuilder.h | 2 +-
polly/include/polly/ScopInfo.h | 4 ++--
polly/lib/Analysis/ScopInfo.cpp | 4 ++--
polly/lib/CodeGen/IslAst.cpp | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/polly/include/polly/CodeGen/IslNodeBuilder.h b/polly/include/polly/CodeGen/IslNodeBuilder.h
index 81343af94b636..03c47155894e8 100644
--- a/polly/include/polly/CodeGen/IslNodeBuilder.h
+++ b/polly/include/polly/CodeGen/IslNodeBuilder.h
@@ -112,7 +112,7 @@ class IslNodeBuilder {
BlockGenerator &getBlockGenerator() { return BlockGen; }
/// Return the parallel subfunctions that have been created.
- const ArrayRef<Function *> getParallelSubfunctions() const {
+ ArrayRef<Function *> getParallelSubfunctions() const {
return ParallelSubfunctions;
}
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h
index ab0f81dd2836d..f700144165d53 100644
--- a/polly/include/polly/ScopInfo.h
+++ b/polly/include/polly/ScopInfo.h
@@ -855,10 +855,10 @@ class MemoryAccess final {
}
/// Return a string representation of the access's reduction type.
- const std::string getReductionOperatorStr() const;
+ std::string getReductionOperatorStr() const;
/// Return a string representation of the reduction type @p RT.
- static const std::string getReductionOperatorStr(ReductionType RT);
+ static std::string getReductionOperatorStr(ReductionType RT);
/// Return the element type of the accessed array wrt. this access.
Type *getElementType() const { return ElementType; }
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index ab9330581eb5b..8c6a2360a249b 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -527,7 +527,7 @@ void MemoryAccess::updateDimensionality() {
}
}
-const std::string
+std::string
MemoryAccess::getReductionOperatorStr(MemoryAccess::ReductionType RT) {
switch (RT) {
case MemoryAccess::RT_NONE:
@@ -910,7 +910,7 @@ void MemoryAccess::realignParams() {
AccessRelation = AccessRelation.align_params(CtxSpace);
}
-const std::string MemoryAccess::getReductionOperatorStr() const {
+std::string MemoryAccess::getReductionOperatorStr() const {
return MemoryAccess::getReductionOperatorStr(getReductionType());
}
diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp
index 142a19d5e069b..09bacda196742 100644
--- a/polly/lib/CodeGen/IslAst.cpp
+++ b/polly/lib/CodeGen/IslAst.cpp
@@ -134,7 +134,7 @@ static isl_printer *printLine(__isl_take isl_printer *Printer,
}
/// Return all broken reductions as a string of clauses (OpenMP style).
-static const std::string getBrokenReductionsStr(const isl::ast_node &Node) {
+static std::string getBrokenReductionsStr(const isl::ast_node &Node) {
IslAstInfo::MemoryAccessSet *BrokenReductions;
std::string str;
More information about the llvm-commits
mailing list