[all-commits] [llvm/llvm-project] 9306bb: [SCEV] Generalize getSmallConstantTripCount(L) for...

Philip Reames via All-commits all-commits at lists.llvm.org
Wed May 26 11:18:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9306bb638ff2b13fb8472b5b035e658c1dcbd74c
      https://github.com/llvm/llvm-project/commit/9306bb638ff2b13fb8472b5b035e658c1dcbd74c
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2021-05-26 (Wed, 26 May 2021)

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

  Log Message:
  -----------
  [SCEV] Generalize getSmallConstantTripCount(L) for multiple exit loops

This came up in review for another patch, see https://reviews.llvm.org/D102982#2782407 for full context.

I've reviewed the callers to make sure they can handle multiple exit loops w/non-zero returns.  There's two cases in target cost models where results might change (Hexagon and PowerPC), but the results looked legal and reasonable.  If a target maintainer wishes to back out the effect of the costing change, they should explicitly check for multiple exit loops and handle them as desired.

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




More information about the All-commits mailing list