[all-commits] [llvm/llvm-project] 14f2ad: [SCEV] Use isKnownPredicateAt in isLoopBackedgeGua...

max-azul via All-commits all-commits at lists.llvm.org
Wed Nov 25 22:25:00 PST 2020


  Branch: refs/heads/temp-test-main
  Home:   https://github.com/llvm/llvm-project
  Commit: 14f2ad0e3cc54d5eb254b545a469e8ffdb62b119
      https://github.com/llvm/llvm-project/commit/14f2ad0e3cc54d5eb254b545a469e8ffdb62b119
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   2020-11-26 (Thu, 26 Nov 2020)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll

  Log Message:
  -----------
  [SCEV] Use isKnownPredicateAt in isLoopBackedgeGuardedByCond

A piece of code in `isLoopBackedgeGuardedByCond` basically duplicates
the dominators traversal from `isBlockEntryGuardedByCond` called from
`isKnownPredicateAt`, but it's less powerful because it does not give context
to `isImpliedCond`. This patch reuses the `isKnownPredicateAt `function there,
reducing the amount of code duplication and making it more powerful.

Differential Revision: https://reviews.llvm.org/D92152
Reviewed By: skatkov




More information about the All-commits mailing list