[PATCH] D90338: [SCEV] Infer addrec nowrap flags while calculating ranges (WIP)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 13:29:43 PDT 2020


nikic created this revision.
Herald added a reviewer: bollu.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
nikic requested review of this revision.

We can already calculate nowrap flags based on range information in proveNoWrapViaConstantRanges(). However, because this happens separately from the range calculation, we lose some information and produce less precise results. Moving the nowrap flag calculation into getRangeRef() allows us to retain full precision.

Similarly to before, this is semantically ugly in that nowrap flags on the addrec are essentially a cache, and are populated based on usage (previously based on whether they were zero/sign extended, not based on whether their range has been computed).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90338

Files:
  llvm/include/llvm/Analysis/ScalarEvolution.h
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/test/Analysis/Delinearization/multidim_only_ivs_3d_cast.ll
  llvm/test/Analysis/ScalarEvolution/different-loops-recs.ll
  llvm/test/Analysis/ScalarEvolution/increasing-or-decreasing-iv.ll
  llvm/test/Analysis/ScalarEvolution/limit-depth.ll
  llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll
  llvm/test/Analysis/ScalarEvolution/pr22641.ll
  llvm/test/Analysis/ScalarEvolution/sext-iv-2.ll
  llvm/test/Analysis/ScalarEvolution/solve-quadratic-overflow.ll
  llvm/test/Analysis/ScalarEvolution/trip-count15.ll
  llvm/test/Analysis/ScalarEvolution/trivial-phis.ll
  llvm/test/Analysis/ScalarEvolution/umin-umax-folds.ll
  llvm/test/Analysis/ScalarEvolution/widenable-condition.ll
  llvm/test/Transforms/IndVarSimplify/monotonic_checks.ll
  llvm/test/Transforms/IndVarSimplify/predicated_ranges.ll
  llvm/test/Transforms/LoopVectorize/ARM/tail-folding-not-allowed.ll
  llvm/test/Transforms/LoopVectorize/X86/vector_ptr_load_store.ll
  llvm/test/Transforms/LoopVectorize/interleaved-accesses-3.ll
  polly/test/ScopInfo/20111108-Parameter-not-detected.ll
  polly/test/ScopInfo/NonAffine/non_affine_conditional_surrounding_non_affine_loop.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90338.301411.patch
Type: text/x-patch
Size: 56401 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201028/193d97c0/attachment.bin>


More information about the llvm-commits mailing list