From: Michael Kruse Date: Tue, 29 Nov 2016 15:11:04 +0000 (+0000) Subject: canSynthesize: Remove unused argument LI. NFC. X-Git-Tag: llvmorg-4.0.0-rc1~3470 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11c5e079250572de22ae8311c4f0dfa791fa10ce;p=platform%2Fupstream%2Fllvm.git canSynthesize: Remove unused argument LI. NFC. The helper function polly::canSynthesize() does not directly use the LoopInfo analysis, hence remove it from its argument list. llvm-svn: 288144 --- diff --git a/polly/include/polly/Support/ScopHelper.h b/polly/include/polly/Support/ScopHelper.h index cdaa1e8..0938025 100644 --- a/polly/include/polly/Support/ScopHelper.h +++ b/polly/include/polly/Support/ScopHelper.h @@ -403,15 +403,13 @@ bool isIgnoredIntrinsic(const llvm::Value *V); /// /// @param V The value to check. /// @param S The current SCoP. -/// @param LI The LoopInfo analysis. /// @param SE The scalar evolution database. /// @param Scope Location where the value would by synthesized. /// @return If the instruction I can be regenerated from its /// scalar evolution representation, return true, /// otherwise return false. bool canSynthesize(const llvm::Value *V, const Scop &S, - const llvm::LoopInfo *LI, llvm::ScalarEvolution *SE, - llvm::Loop *Scope); + llvm::ScalarEvolution *SE, llvm::Loop *Scope); /// Return the block in which a value is used. /// diff --git a/polly/lib/Analysis/ScopBuilder.cpp b/polly/lib/Analysis/ScopBuilder.cpp index 7c45aa9..81f503f 100644 --- a/polly/lib/Analysis/ScopBuilder.cpp +++ b/polly/lib/Analysis/ScopBuilder.cpp @@ -59,7 +59,7 @@ void ScopBuilder::buildPHIAccesses(PHINode *PHI, Region *NonAffineSubRegion, // the region. If it is not it can only be in the exit block of the region. // In this case we model the operands but not the PHI itself. auto *Scope = LI.getLoopFor(PHI->getParent()); - if (!IsExitBlock && canSynthesize(PHI, *scop, &LI, &SE, Scope)) + if (!IsExitBlock && canSynthesize(PHI, *scop, &SE, Scope)) return; // PHI nodes are modeled as if they had been demoted prior to the SCoP @@ -562,7 +562,7 @@ void ScopBuilder::ensureValueRead(Value *V, BasicBlock *UserBB) { // If the instruction can be synthesized and the user is in the region we do // not need to add a value dependences. auto *Scope = LI.getLoopFor(UserBB); - if (canSynthesize(V, *scop, &LI, &SE, Scope)) + if (canSynthesize(V, *scop, &SE, Scope)) return; // Do not build scalar dependences for required invariant loads as we will diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index b3e4f35..0cf65ec 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -264,7 +264,7 @@ void BlockGenerator::generateArrayStore(ScopStmt &Stmt, StoreInst *Store, bool BlockGenerator::canSyntheziseInStmt(ScopStmt &Stmt, Instruction *Inst) { Loop *L = getLoopForStmt(Stmt); return (Stmt.isBlockStmt() || !Stmt.getRegion()->contains(L)) && - canSynthesize(Inst, *Stmt.getParent(), &LI, &SE, L); + canSynthesize(Inst, *Stmt.getParent(), &SE, L); } void BlockGenerator::copyInstruction(ScopStmt &Stmt, Instruction *Inst, diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp index 856a67c..052e5b3 100644 --- a/polly/lib/CodeGen/IslNodeBuilder.cpp +++ b/polly/lib/CodeGen/IslNodeBuilder.cpp @@ -203,8 +203,7 @@ static int findReferencesInBlock(struct SubtreeReferences &References, for (const Instruction &Inst : *BB) for (Value *SrcVal : Inst.operands()) { auto *Scope = References.LI.getLoopFor(BB); - if (canSynthesize(SrcVal, References.S, &References.LI, &References.SE, - Scope)) { + if (canSynthesize(SrcVal, References.S, &References.SE, Scope)) { References.SCEVs.insert(References.SE.getSCEVAtScope(SrcVal, Scope)); continue; } else if (Value *NewVal = References.GlobalMap.lookup(SrcVal)) diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp index d7fd4a3..899355e 100644 --- a/polly/lib/Support/ScopHelper.cpp +++ b/polly/lib/Support/ScopHelper.cpp @@ -495,8 +495,7 @@ bool polly::isIgnoredIntrinsic(const Value *V) { return false; } -bool polly::canSynthesize(const Value *V, const Scop &S, - const llvm::LoopInfo *LI, ScalarEvolution *SE, +bool polly::canSynthesize(const Value *V, const Scop &S, ScalarEvolution *SE, Loop *Scope) { if (!V || !SE->isSCEVable(V->getType())) return false;