[all-commits] [llvm/llvm-project] 2aa480: [SCEV] Remove expensive inverted reasoning from is...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Sep 30 06:57:58 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2aa480bae38ad5f2c305d28dd5a2d515a8fca254
      https://github.com/llvm/llvm-project/commit/2aa480bae38ad5f2c305d28dd5a2d515a8fca254
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2026-09-30 (Wed, 30 Sep 2026)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/unittests/Analysis/ScalarEvolutionTest.cpp

  Log Message:
  -----------
  [SCEV] Remove expensive inverted reasoning from isImpliedCond. (#227302)

The constructing the inverted expressions and the additional reasoning
is quite expensive (0.35% for CTMark O3), for marginal gain (3 small
regressions on
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/1494)

I think that should allow us to spend compile-time on SCEV on areas with
higher impact.

2 of those could be recovered by constant-based reasoning about the
inverted condition.

Compile-time improvements:
stage1-O3: -0.35%
stage1-ReleaseThinLTO: -0.32%
stage1-ReleaseLTO-g: -0.28%
stage1-aarch64-O3: -0.31%
stage2-O3: -0.32%
stage2-clang: -0.06%


https://llvm-compile-time-tracker.com/compare.php?from=197c16add5b16f4bd68c4f4bae115723e74330e2&to=30dc497653f0daafd602d29a1ead334599055619&stat=instructions:u

PR: https://github.com/llvm/llvm-project/pull/227302



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list