Make byref llvm::Use parameters const. NFC.

llvm-svn: 308522
This commit is contained in:
Michael Kruse 2017-07-19 20:41:56 +00:00
parent eb04da3a56
commit 89da6bbcb4
4 changed files with 5 additions and 4 deletions

View File

@ -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.
///

View File

@ -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.
///

View File

@ -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<Instruction>(U.getUser());
if (!UI)
return nullptr;

View File

@ -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);