[all-commits] [llvm/llvm-project] a0f704: [SCEV] Skip invalidation with empty ValueExprMap (...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Sep 28 09:07:48 PDT 2026


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

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

  Log Message:
  -----------
  [SCEV] Skip invalidation with empty ValueExprMap (NFC). (#226845)

forgetLoop, forgetValue and forgetValues walk the def-use chains from
the forgotten instructions and erase each visited value's SCEV. This can
be expensive.

If ValueExprMap is empty, there's nothing to forget and skipping the
walk reduces compile-time a bit:
stage1-O3: -0.05%
stage1-ReleaseThinLTO: -0.05%
stage1-ReleaseLTO-g: -0.03%
stage1-aarch64-O3: -0.04%
stage2-O3: -0.05%
stage2-clang: -0.01%


https://llvm-compile-time-tracker.com/compare.php?from=899d817c7950c997402cd229935cd822acf45b08&to=c43f92b9840b62f75ab8a45b7379188d78d81135&stat=instructions:u

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



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