[all-commits] [llvm/llvm-project] 94b35e: [ScalarEvolution] Factor out RewriteMap utilities ...

Dmitry Makogon via All-commits all-commits at lists.llvm.org
Fri Mar 3 04:23:05 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 94b35eef4e1837a40643ca64ff8bfd319d166e67
      https://github.com/llvm/llvm-project/commit/94b35eef4e1837a40643ca64ff8bfd319d166e67
  Author: Dmitry Makogon <d.makogon at g.nsu.ru>
  Date:   2023-03-03 (Fri, 03 Mar 2023)

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

  Log Message:
  -----------
  [ScalarEvolution] Factor out RewriteMap utilities in applyLoopGuards (NFC)

This factors out two utilities used with RewriteMap in applyLoopGuards:
 - AddRewrite, which puts a rewrite rule in the map and if needed registers
   the rewrite in the list of rewritten expressions,
 - GetMaybeRewritten, which checks whether an expression has already been
   rewritten, and if so, returns the rewrite. Otherwise, returns the given
   expression.

This may be needed when adding new rewrite rules as not to copy-paste this
code.


  Commit: f747cba68d36d24a33f0d36f7ac5bfd840499937
      https://github.com/llvm/llvm-project/commit/f747cba68d36d24a33f0d36f7ac5bfd840499937
  Author: Dmitry Makogon <d.makogon at g.nsu.ru>
  Date:   2023-03-03 (Fri, 03 Mar 2023)

  Changed paths:
    M llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info-rewrite-expressions.ll

  Log Message:
  -----------
  [Test] Add more tests with min/max loop guards (NFC)

This adds more test cases with loop guards involving min/max
and which should be covered by ScalarEvolution::applyLoopGuards.


Compare: https://github.com/llvm/llvm-project/compare/f5097ed84694...f747cba68d36


More information about the All-commits mailing list