[all-commits] [llvm/llvm-project] 43f6b0: [Attributor] Skip the dead-internal-function walk ...

Farid Zakaria via All-commits all-commits at lists.llvm.org
Mon Sep 28 21:04:49 PDT 2026


  Branch: refs/heads/users/fmzakari/attributor-skip-dead-walk
  Home:   https://github.com/llvm/llvm-project
  Commit: 43f6b06de81b8a68a72cd7fb98fea84c6d50db58
      https://github.com/llvm/llvm-project/commit/43f6b06de81b8a68a72cd7fb98fea84c6d50db58
  Author: Farid Zakaria <fmzakari at meta.com>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/cleanup-no-seeding.ll

  Log Message:
  -----------
  [Attributor] Skip the dead-internal-function walk for AAs that will not be updated

AAIsDeadFunction::initialize calls isAssumedDeadInternalFunction, which
runs checkForAllCallSites and so creates an AAIsDead for every internal
caller, each of which repeats the walk. Initialization therefore recurses
through the whole cone of internal callers.

When the AA will not be updated (outside of deduction, or for a function
the Attributor is not run on), getOrCreateAAFor fixes it pessimistically
right after initialize returns, discarding the walk's result. Skip the
walk in that case and assume the entry block live.

This is the dominant cost of the CGSCC OpenMPOpt pass, whose cleanupIR
queries the liveness of callers outside the current SCC on every SCC,
giving (#SCCs) x (depth of the internal caller chain). #222226 removed
the callee-seeding half of this cost; this removes the walk itself.

cleanup-no-seeding.ll drops a debug check that only the removed walk
printed.

Assisted-by: Claude



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