[all-commits] [llvm/llvm-project] 22b79f: [MachinePipeliner] Limit the number of stores in B...

Ryotaro Kasuga via All-commits all-commits at lists.llvm.org
Thu Oct 9 03:20:08 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 22b79fb3b9d051a83520eaa9d03abad782697448
      https://github.com/llvm/llvm-project/commit/22b79fb3b9d051a83520eaa9d03abad782697448
  Author: Ryotaro Kasuga <kasuga.ryotaro at fujitsu.com>
  Date:   2025-10-09 (Thu, 09 Oct 2025)

  Changed paths:
    M llvm/lib/CodeGen/MachinePipeliner.cpp

  Log Message:
  -----------
  [MachinePipeliner] Limit the number of stores in BB (#154940)

The dependency analysis in MachinePipeliner checks dependencies for
every pair of store instructions in the target basic block. This means
the time complexity of the analysis is `O(N^2)`, where `N` is the number
of store instructions. Therefore, compilation time can become
significantly long when there are too many store instructions.

To mitigate it, this patch introduces logic to count the number of store
instructions at the beginning of the pipeliner and bail out if it
exceeds the threshold. The default value if the threshold should be
large enough. Thus, in most practical cases where the pipeliner is
beneficial, this patch should not cause any performance regression.

Related issue: #150262



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