[all-commits] [llvm/llvm-project] 9100bd: [SCEV][NFC] Introduce isBasicBlockEntryGuardedByCond

max-azul via All-commits all-commits at lists.llvm.org
Tue Sep 29 01:54:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9100bd772d4ff153fd2d5cb13034f4ed8ea2d477
      https://github.com/llvm/llvm-project/commit/9100bd772d4ff153fd2d5cb13034f4ed8ea2d477
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   2020-09-29 (Tue, 29 Sep 2020)

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

  Log Message:
  -----------
  [SCEV][NFC] Introduce isBasicBlockEntryGuardedByCond

Currently, we have `isLoopEntryGuardedByCond` method in SCEV, which
checks that some fact is true if we enter the loop. In fact, this is just a
particular case of more general concept `isBasicBlockEntryGuardedByCond`
applied to given loop's header. In fact, the logic if this code is largely
independent on the given loop and only cares code above it.

This patch makes this generalization. Now we can query it for any block,
and `isBasicBlockEntryGuardedByCond` is just a particular case.

Differential Revision: https://reviews.llvm.org/D87828
Reviewed By: fhahn




More information about the All-commits mailing list