[all-commits] [llvm/llvm-project] d1e880: [SCEV] Enable verification in LoopPM

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Mar 7 00:46:39 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d1e880acaa6f096618fa09d18daf17b9300558fc
      https://github.com/llvm/llvm-project/commit/d1e880acaa6f096618fa09d18daf17b9300558fc
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-03-07 (Mon, 07 Mar 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/ScalarEvolution.h
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/lib/Transforms/Scalar/LoopPassManager.cpp
    M llvm/test/Transforms/IndVarSimplify/X86/deterministic-scev-verify.ll
    M llvm/test/Transforms/IndVarSimplify/X86/pr35406.ll

  Log Message:
  -----------
  [SCEV] Enable verification in LoopPM

Currently, we hardly ever actually run SCEV verification, even in
tests with -verify-scev. This is because the NewPM LPM does not
verify SCEV. The reason for this is that SCEV verification can
actually change the result of subsequent SCEV queries, which means
that you see different transformations depending on whether
verification is enabled or not.

To allow verification in the LPM, this limits verification to
BECounts that have actually been cached. It will not calculate
new BECounts.

BackedgeTakenInfo::getExact() is still not entirely readonly,
it still calls getUMinFromMismatchedTypes(). But I hope that this
is not problematic in the same way. (This could be avoided by
performing the umin in the other SCEV instance, but this would
require duplicating some of the code.)

Differential Revision: https://reviews.llvm.org/D120551




More information about the All-commits mailing list