[all-commits] [llvm/llvm-project] 35ab21: [SCEV] Use trivial bound on defining scope of all ...

Philip Reames via All-commits all-commits at lists.llvm.org
Sun Oct 3 16:16:08 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 35ab211c37534fda0288acda510ee5bc6b85f96a
      https://github.com/llvm/llvm-project/commit/35ab211c37534fda0288acda510ee5bc6b85f96a
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2021-10-03 (Sun, 03 Oct 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/ScalarEvolution.h
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/flags-from-poison.ll

  Log Message:
  -----------
  [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.


  Commit: 5f7a5353301b776ffb0e5fb048992898507bf7ee
      https://github.com/llvm/llvm-project/commit/5f7a5353301b776ffb0e5fb048992898507bf7ee
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2021-10-03 (Sun, 03 Oct 2021)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp

  Log Message:
  -----------
  [SCEV] Cap the number of instructions scanned when infering flags

This addresses a comment from review on D109845.  The concern was raised that an unbounded scan would be expensive.  Long term plan is to cache this search - likely reusing the existing mechanism for loop side effects - but let's be simple and conservative for now.


Compare: https://github.com/llvm/llvm-project/compare/d02db32644b7...5f7a5353301b


More information about the All-commits mailing list