[all-commits] [llvm/llvm-project] be40b8: [BOLT] Give BinaryBasicBlock a GraphTraits block n...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Jul 8 23:46:39 PDT 2026


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

  Changed paths:
    M bolt/include/bolt/Core/BinaryBasicBlock.h
    M bolt/include/bolt/Core/BinaryFunction.h
    M bolt/lib/Core/BinaryFunction.cpp

  Log Message:
  -----------
  [BOLT] Give BinaryBasicBlock a GraphTraits block number (#207899)

LoopInfoBase (and DominatorTreeBase) keep a DenseMap fallback for block
types whose GraphTraits lacks getNumber() (#103400); BOLT's
BinaryLoopInfo is one of the last two users.

BinaryBasicBlock already carries a dense [0, size) index (getIndex(),
assigned by updateBBIndices()). Expose it as the GraphTraits node
number, mirroring llvm::BasicBlock/Function.

This makes `GraphHasNodeNumbers<BinaryBasicBlock *>` true, moving BOLT's
LoopInfo and DominatorTree onto the number-indexed (SmallVector) path.
Prerequisite for requiring GraphHasNodeNumbers in LoopInfoBase.

Aided by Claude Opus 4.8



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