summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-08-05 08:53:17 -0700
committerKazu Hirata <kazu@google.com>2021-08-05 08:53:17 -0700
commit72661f337ae03f5cb2988717bc1486cd9bc4baef (patch)
treebc4c0b733f89c692d0fb75c0e852c31e5519bff5
parente7c3eaa8aeba497bcd61adeeaafce5b99ff756a8 (diff)
downloadllvm-72661f337ae03f5cb2988717bc1486cd9bc4baef.tar.gz
[Transforms] Drop unnecessary const from return types (NFC)
Identified with readability-const-return-type.
-rw-r--r--llvm/lib/Transforms/Scalar/SROA.cpp2
-rw-r--r--llvm/lib/Transforms/Vectorize/VPlan.cpp4
-rw-r--r--llvm/lib/Transforms/Vectorize/VPlan.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index fe160d5415bd..b3c4308ae80c 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -122,7 +122,7 @@ namespace {
class IRBuilderPrefixedInserter final : public IRBuilderDefaultInserter {
std::string Prefix;
- const Twine getNameWithPrefix(const Twine &Name) const {
+ Twine getNameWithPrefix(const Twine &Name) const {
return Name.isTriviallyEmpty() ? Name : Prefix + Name;
}
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index f1ef0833db38..d0a6fdef8d21 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -933,12 +933,12 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopPreHeaderBB,
}
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-const Twine VPlanPrinter::getUID(const VPBlockBase *Block) {
+Twine VPlanPrinter::getUID(const VPBlockBase *Block) {
return (isa<VPRegionBlock>(Block) ? "cluster_N" : "N") +
Twine(getOrCreateBID(Block));
}
-const Twine VPlanPrinter::getOrCreateName(const VPBlockBase *Block) {
+Twine VPlanPrinter::getOrCreateName(const VPBlockBase *Block) {
const std::string &Name = Block->getName();
if (!Name.empty())
return Name;
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 5d6a056fefd3..34fa2bfc5079 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -2250,9 +2250,9 @@ class VPlanPrinter {
return BlockID.count(Block) ? BlockID[Block] : BlockID[Block] = BID++;
}
- const Twine getOrCreateName(const VPBlockBase *Block);
+ Twine getOrCreateName(const VPBlockBase *Block);
- const Twine getUID(const VPBlockBase *Block);
+ Twine getUID(const VPBlockBase *Block);
/// Print the information related to a CFG edge between two VPBlockBases.
void drawEdge(const VPBlockBase *From, const VPBlockBase *To, bool Hidden,