[SCEVAffinator] Do not scan redundantly for parameters

In r286430 "SCEVValidator: add new parameters resulting from constant
extraction" we added functionality to scan for parameters after constant
extraction has taken place to ensure newly created parameters are correctly
registered. This addition made the already existing registration of parameters
redundant. Hence, we remove the corresponding call in this commit.

An alternative solution would have been to also perform constant extraction when
validating SCEV expressions and to then scan for parameters when validating
a SCEV expression. However, as SCEV validation is used during SCoP detection
where we want to be especially fast, adding additional functionality on this
hot path should be avoided if good alternatives exist. In this case, we can
choose to continue to only transform SCEV expression when actually modeling
them. As all transformations we perform are expected to not change the validity
of the SCEV expressions, this solution seems preferable.

Suggested-by: Eli Friedman <efriedma@codeaurora.org>
llvm-svn: 286780
This commit is contained in:
Tobias Grosser 2016-11-13 21:28:07 +00:00
parent 2371589266
commit 5743e8de86
1 changed files with 0 additions and 3 deletions

View File

@ -140,9 +140,6 @@ __isl_give PWACtx SCEVAffinator::getPwAff(const SCEV *Expr, BasicBlock *BB) {
} else
NumIterators = 0;
auto *Scope = getScope();
S->addParams(getParamsInAffineExpr(&S->getRegion(), Scope, Expr, SE));
return visit(Expr);
}