///
/// @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.
///
// 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
// 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
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,
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))
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;