[all-commits] [llvm/llvm-project] 214e2d: [SCEV] Avoid repeated proveNoSignedWrapViaInductio...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Jul 29 01:15:28 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 214e2d8fe5729de016b45c19274100a94ddc3454
      https://github.com/llvm/llvm-project/commit/214e2d8fe5729de016b45c19274100a94ddc3454
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-07-29 (Fri, 29 Jul 2022)

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

  Log Message:
  -----------
  [SCEV] Avoid repeated proveNoSignedWrapViaInduction calls.

 At the moment, proveNoSignedWrapViaInduction may be called for the
same AddRec a large number of times via getSignExtendExpr. This can have
a severe compile-time impact for very loop-heavy code.

If proveNoSignedWrapViaInduction failed to prove NSW the first time,
it is unlikely to succeed on subsequent tries and the cost doesn't seem
to be justified.

This is the signed version of 8daa338297d533d / D130648.

This can drastically improve compile-time in some excessive cases and
also has a slightly positive compile-time impact on CTMark:

NewPM-O3: -0.06%
NewPM-ReleaseThinLTO: -0.04%
NewPM-ReleaseLTO-g: -0.04%

https://llvm-compile-time-tracker.com/compare.php?from=8daa338297d533db4d1ae8d3770613eb25c29688&to=aed126a196e7a5a9803543d9b4d6bdb233d0009c&stat=instructions

Reviewed By: nikic

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




More information about the All-commits mailing list