[all-commits] [llvm/llvm-project] d55259: [CycleInfo] Move representation-dependent queries ...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Jul 15 10:15:35 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d55259aa61b703ce63613a022c5cb14f6b588b46
      https://github.com/llvm/llvm-project/commit/d55259aa61b703ce63613a022c5cb14f6b588b46
  Author: Fangrui Song <i at maskray.me>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    M llvm/include/llvm/ADT/GenericCycleImpl.h
    M llvm/include/llvm/ADT/GenericCycleInfo.h
    M llvm/include/llvm/ADT/GenericUniformityImpl.h
    M llvm/include/llvm/ADT/GenericUniformityInfo.h
    M llvm/include/llvm/CodeGen/MachineCycleAnalysis.h
    M llvm/include/llvm/IR/GenericConvergenceVerifierImpl.h
    M llvm/lib/Analysis/CFG.cpp
    M llvm/lib/Analysis/UniformityAnalysis.cpp
    M llvm/lib/CodeGen/MachineCycleAnalysis.cpp
    M llvm/lib/CodeGen/MachineSink.cpp
    M llvm/lib/CodeGen/MachineUniformityAnalysis.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUGlobalISelDivergenceLowering.cpp
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/lib/Transforms/Utils/FixIrreducible.cpp

  Log Message:
  -----------
  [CycleInfo] Move representation-dependent queries to GenericCycleInfo. NFC

With the Euler tour representation (#208614), blocks live in
GenericCycleInfo::BlockLayout and GenericCycle keeps a `CI` back-pointer just
so the out-of-line contains(BlockT *) and blocks() can reach it.

Adopt the design suggested by @aengelke, move the
representation-dependent queries to GenericCycleInfo, taking the cycle
as an argument (contains, getBlocks, getExitBlocks, getExitingBlocks,
getCyclePreheader, getCyclePredecessor, verifyCycle, verifyCycleNest,
and per-cycle print), and delete GenericCycle::CI.

- GenericCycleInfo's move operations become defaulted, dropping the
  CI re-pointing walk, and sizeof(GenericCycle) shrinks by a pointer.
- isCycleInvariant gains a MachineCycleInfo parameter, and
  GenericUniformityInfo gains getCycleInfo() for callers that only hold the
  uniformity result.

Aided by Claude Fable 5

Pull Request: https://github.com/llvm/llvm-project/pull/209665



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