[SLP]Improve and simplify extendSchedulingRegion.
authorAlexey Bataev <a.bataev@outlook.com>
Wed, 24 Mar 2021 14:13:58 +0000 (07:13 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Thu, 25 Mar 2021 12:31:58 +0000 (05:31 -0700)
commit568c8741170fcaa6f7fa968578e1b99e94886b46
tree0506be86113d6e29f2a8d3ee7a00c8d348caec99
parent8420a5332486c682c1aaddbcb58a571869d19832
[SLP]Improve and simplify extendSchedulingRegion.

We do not need to scan further if the upper end or lower end of the
basic block is reached already and the instruction is not found. It
means that the instruction is definitely in the lower part of basic
block or in the upper block relatively.
This should improve compile time for the very big basic blocks.

Differential Revision: https://reviews.llvm.org/D99266
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/crash_exceed_scheduling.ll