Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huge compile-time regression for Windows targets since LLVM 12, incl. latest 13-rc2 #51169

Closed
llvmbot opened this issue Sep 12, 2021 · 2 comments
Labels
bugzilla Issues migrated from bugzilla llvm:codegen

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Sep 12, 2021

Bugzilla Link 51827
Resolution FIXED
Resolved on Oct 20, 2021 16:59
Version trunk
OS Windows NT
Attachments xz-compressed bitcode input file
Reporter LLVM Bugzilla Contributor
CC @aeubanks,@RKSimon,@nikic,@rotateright
Fixed by commit(s) https://reviews.llvm.org/D111596

Extended Description

I'm seeing a codegen slowdown by about 2 orders of magnitude for the attached .bc file (generated by LDC, the LLVM D compiler) starting with LLVM 12.0.0. Seems to be specific to Windows/MSVC targets, and timings are back to normal when enabling the optimizer.

Using clang from the official LLVM Windows builds from GitHub and compiling via clang -c template9.bc:

  • v11.0.1: ~2.4 seconds
  • v12.0.1: ~246 seconds
  • v13.0.0-rc2: ~227 seconds

Enabling the optimizer by adding -O3 hints at a further little regression in v13:

  • v11.0.1: ~3.3 seconds
  • v12.0.1: ~3.3 seconds
  • v13.0.0-rc2: ~5.0 seconds
@nikic
Copy link
Contributor

nikic commented Sep 12, 2021

Looks like there's a function with 100000 stores in a block and we spend a lot of time in mergeConsecutiveStores() in DAGCombine.

@aeubanks
Copy link
Contributor

Proposed patch: https://reviews.llvm.org/D111596

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm:codegen
Projects
None yet
Development

No branches or pull requests

3 participants