From a2f1c401ac85fd1314cea30b3f44bba1142ce9e9 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Wed, 19 Jul 2017 20:41:56 +0000 Subject: [PATCH] Make byref llvm::Use parameters const. NFC. git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@308522 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/polly/Support/ScopHelper.h | 2 +- include/polly/Support/VirtualInstruction.h | 2 +- lib/Support/ScopHelper.cpp | 2 +- lib/Support/VirtualInstruction.cpp | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/polly/Support/ScopHelper.h b/include/polly/Support/ScopHelper.h index 0a8d3647..19aecc59 100644 --- a/include/polly/Support/ScopHelper.h +++ b/include/polly/Support/ScopHelper.h @@ -409,7 +409,7 @@ bool canSynthesize(const llvm::Value *V, const Scop &S, /// operand must be defined (i.e. its definition dominates this block). /// Non-instructions do not use operands at a specific point such that in this /// case this function returns nullptr. -llvm::BasicBlock *getUseBlock(llvm::Use &U); +llvm::BasicBlock *getUseBlock(const llvm::Use &U); /// Derive the individual index expressions from a GEP instruction. /// diff --git a/include/polly/Support/VirtualInstruction.h b/include/polly/Support/VirtualInstruction.h index e6328ebc..746958a5 100644 --- a/include/polly/Support/VirtualInstruction.h +++ b/include/polly/Support/VirtualInstruction.h @@ -97,7 +97,7 @@ public: /// @param Virtual Whether to ignore existing MemoryAcccess. /// /// @return The VirtualUse representing the same use as @p U. - static VirtualUse create(Scop *S, Use &U, LoopInfo *LI, bool Virtual); + static VirtualUse create(Scop *S, const Use &U, LoopInfo *LI, bool Virtual); /// Get a VirtualUse for any kind of use of a value within a statement. /// diff --git a/lib/Support/ScopHelper.cpp b/lib/Support/ScopHelper.cpp index bff8de34..d3e1e994 100644 --- a/lib/Support/ScopHelper.cpp +++ b/lib/Support/ScopHelper.cpp @@ -508,7 +508,7 @@ bool polly::canSynthesize(const Value *V, const Scop &S, ScalarEvolution *SE, return false; } -llvm::BasicBlock *polly::getUseBlock(llvm::Use &U) { +llvm::BasicBlock *polly::getUseBlock(const llvm::Use &U) { Instruction *UI = dyn_cast(U.getUser()); if (!UI) return nullptr; diff --git a/lib/Support/VirtualInstruction.cpp b/lib/Support/VirtualInstruction.cpp index e3c2cfa3..712c72f8 100644 --- a/lib/Support/VirtualInstruction.cpp +++ b/lib/Support/VirtualInstruction.cpp @@ -18,7 +18,8 @@ using namespace polly; using namespace llvm; -VirtualUse VirtualUse ::create(Scop *S, Use &U, LoopInfo *LI, bool Virtual) { +VirtualUse VirtualUse ::create(Scop *S, const Use &U, LoopInfo *LI, + bool Virtual) { auto *UserBB = getUseBlock(U); auto *UserStmt = S->getStmtFor(UserBB); auto *UserScope = LI->getLoopFor(UserBB); -- 2.11.4.GIT