Skip to content

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented Oct 9, 2025

Backport 22b79fb

Requested by: @kasuga-fj

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: llvm#150262

(cherry picked from commit 22b79fb)
@llvmbot
Copy link
Member Author

llvmbot commented Oct 9, 2025

@aankit-ca What do you think about merging this PR to the release branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

2 participants