aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorMax Kazantsev <max.kazantsev@azul.com>2017-10-25 06:10:02 +0000
committerMax Kazantsev <max.kazantsev@azul.com>2017-10-25 06:10:02 +0000
commit4332a943bc33fe5e933dda939be43c406fb97eaa (patch)
tree15cc1031958efe5a968efccd8ea507eb228f500d /llvm/lib/CodeGen/MachineScheduler.cpp
parentf0123607700a275c07f975a1cc0cb317fb3efc5b (diff)
downloadllvm-4332a943bc33fe5e933dda939be43c406fb97eaa.zip
llvm-4332a943bc33fe5e933dda939be43c406fb97eaa.tar.gz
llvm-4332a943bc33fe5e933dda939be43c406fb97eaa.tar.bz2
[IRCE] Smarter detection of empty ranges using SCEV
For a SCEV range, this patch replaces the naive emptiness check for SCEV ranges which looks like `Begin == End` with a SCEV check. The range is guaranteed to be empty of `Begin >= End`. We should filter such ranges out and do not try to perform IRCE for them. For example, we can get such range when intersecting range `[A, B)` and `[C, D)` where `A < B < C < D`. The resulting range is `[max(A, C), min(B, D)) = [C, B)`. This range is empty, but its `Begin` does not match with `End`. Making IRCE for an empty range is basically safe but unprofitable because we never actually get into the main loop where the range checks are supposed to be eliminated. This patch uses SCEV mechanisms to treat loops with proved `Begin >= End` as empty. Differential Revision: https://reviews.llvm.org/D39082 llvm-svn: 316550
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
0 files changed, 0 insertions, 0 deletions