[SCEV] Use trivial bound on defining scope of all SCEVs when computing flags
authorPhilip Reames <listmail@philipreames.com>
Sun, 3 Oct 2021 23:01:30 +0000 (16:01 -0700)
committerPhilip Reames <listmail@philipreames.com>
Sun, 3 Oct 2021 23:01:30 +0000 (16:01 -0700)
commit35ab211c37534fda0288acda510ee5bc6b85f96a
treeb40513f01acf0df768be081b76b13b3d0478f959
parentd02db32644b7360bcda54cdf739fa42abe450fcd
[SCEV] Use trivial bound on defining scope of all SCEVs when computing flags

This addresses a comment from review on D109845.  Even for SCEVs which we can't find true bounds without recursing through operands, entry to the function forms a trivial upper bound.  In some cases, this trivial bound is enough to prove safety of flag inference.
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/flags-from-poison.ll