Page MenuHomePhabricator

[SCEV] Use the number of steps of an IV to clamp max BTC (WIP).
Needs ReviewPublic

Authored by fhahn on Oct 16 2020, 12:36 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

As discussed in D89381, we can use the range of an non-wrapping IV to
clamp down the max BTC in some cases.

This impacts a few other test cases that I still need to update and it
seems in some cases the new bound is more precise than the exact exit
count, which I still need to investigate. I just wanted to share this
early.

Diff Detail

Unit TestsFailed

TimeTest
80 mslinux > LLVM.Analysis/ScalarEvolution::max-trip-count.ll
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Analysis/ScalarEvolution/max-trip-count.ll -analyze -enable-new-pm=0 -scalar-evolution | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/Analysis/ScalarEvolution/max-trip-count.ll
40 mslinux > LLVM.Analysis/ScalarEvolution::ptrtoint-constantexpr-loop.ll
Script: -- : 'RUN: at line 2'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Analysis/ScalarEvolution/ptrtoint-constantexpr-loop.ll --data-layout="p:64:64:64:64" -S -analyze -enable-new-pm=0 -scalar-evolution | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck --check-prefixes=ALL,X64,PTR64_IDX64 /mnt/disks/ssd0/agent/llvm-project/llvm/test/Analysis/ScalarEvolution/ptrtoint-constantexpr-loop.ll
120 mslinux > LLVM.Analysis/ScalarEvolution::sdiv.ll
Script: -- : 'RUN: at line 2'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Analysis/ScalarEvolution/sdiv.ll -scalar-evolution -analyze -enable-new-pm=0 | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/Analysis/ScalarEvolution/sdiv.ll
40 mslinux > LLVM.Analysis/ScalarEvolution::srem.ll
Script: -- : 'RUN: at line 2'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Analysis/ScalarEvolution/srem.ll -scalar-evolution -analyze -enable-new-pm=0 | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/Analysis/ScalarEvolution/srem.ll
60 mslinux > LLVM.Analysis/ScalarEvolution::trip-count-andor.ll
Script: -- : 'RUN: at line 2'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Analysis/ScalarEvolution/trip-count-andor.ll -analyze -enable-new-pm=0 -scalar-evolution -scalar-evolution-classify-expressions=0 2>&1 | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/Analysis/ScalarEvolution/trip-count-andor.ll
View Full Test Results (18 Failed)