[SCEVAffinator] Do not scan redundantly for parameters
commit10d12807d7a28b35e1eb8793630d436fdbc31127
authorTobias Grosser <tobias@grosser.es>
Sun, 13 Nov 2016 21:28:07 +0000 (13 21:28 +0000)
committerTobias Grosser <tobias@grosser.es>
Sun, 13 Nov 2016 21:28:07 +0000 (13 21:28 +0000)
treeddccac7ed971b3399ca18904009e0ad0d03e25c1
parent5e5feb770e1aa540c32c897da0cee65115755ccf
[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>
git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@286780 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/SCEVAffinator.cpp