Skip to content

Restore LLVM 3.7 MemoryDependenceAnalysis default - #9003

Merged
Chris B (llvm-beanz) merged 1 commit into
microsoft:mainfrom
llvm-beanz:rollback-memdep
Oct 6, 2026
Merged

Chris B (llvm-beanz) merged 1 commit into
microsoft:mainfrom
llvm-beanz:rollback-memdep

Conversation

@llvm-beanz

@llvm-beanz Chris B (llvm-beanz) commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

This restores the BlockScanLimit in MemoryDependenceAnalysis to its LLVM 3.7 default (100), from what it was changed to in PR #2725.

I'm not entirely sure what PR #2725 was trying to accomplish, and the tests it added still pass even with the original limit. What I do know is that the larger limit can cause massive compile-time regressions by allowing GVN to go off into the weeds for all eternity.

The original PR also didn't seem to catch that the limit impacts not just DSE, but also GVN (and MemCpyOpt but DXC disables that).

I've left the rest of PR #2725 in-tact, but I'm generally dubious of it. We certainly should be a lot more careful about changing LLVM core IR passes since we don't have the ability to run any of the IR pass tests.

This restores the BlockScanLimit in MemoryDependenceAnalysis to its LLVM
3.7 default (100), from what it was changed to in PR microsoft#2725.

I'm not entirely sure wht PR microsoft#2725 was trying to accomplish, and the
tests it added still pass even with the original limit. What I do know
is that the larger limit can cause _massive_ compile-time regressions by
allowing GVN to go off into the weeds for all eternity.

The original PR also didn't seem to catch that the limit impacts not
just DSE, but also GVN (and MemCpyOpt but DXC disables that).

I've left the rest of PR microsoft#2725 in-tact, but I'm generally dubious of it.
We certainly should be _a lot_ more careful about changing LLVM core IR
passes since we don't have the ability to run any of the IR pass tests.
Copilot AI balanced review requested due to automatic review settings October 5, 2026 20:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@llvm-beanz
Chris B (llvm-beanz) merged commit 3379c6a into microsoft:main Oct 6, 2026
14 checks passed
@llvm-beanz
Chris B (llvm-beanz) deleted the rollback-memdep branch October 6, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants