[all-commits] [llvm/llvm-project] 7ef819: [Reassociate] Compute value ranks iteratively (NFC...

Hao Ren via All-commits all-commits at lists.llvm.org
Thu Jul 9 14:59:13 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ef81943c901b4963f163efe571d7bfa7ced43ff
      https://github.com/llvm/llvm-project/commit/7ef81943c901b4963f163efe571d7bfa7ced43ff
  Author: Hao Ren <haor at nvidia.com>
  Date:   2026-07-09 (Thu, 09 Jul 2026)

  Changed paths:
    M llvm/lib/Transforms/Scalar/Reassociate.cpp

  Log Message:
  -----------
  [Reassociate] Compute value ranks iteratively (NFC) (#204952)

ReassociatePass::getRank recursively walks operand def-use chains before
memoizing ranks. For a very deep acyclic chain whose tail feeds a
reassociable operation, this can recurse once per chain element and
overflow the native stack.

Compute ranks with an explicit post-order worklist instead. The worklist
preserves the existing rank calculation and memoization behavior while
bounding native stack use.

Co-authored-by: Justin Fargnoli <jfargnoli at nvidia.com>



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