-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Enable LLVM Polly via llvm-args. #78566
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@bors r+ AFAICT, this should not change anything for users not building the compiler locally (and enabling this option). |
📌 Commit 301bb12 has been approved by |
Rollup of 12 pull requests Successful merges: - rust-lang#74754 (Add `#[cfg(panic = '...')]`) - rust-lang#76468 (Improve lifetime name annotations for closures & async functions) - rust-lang#77016 (Test clippy on PR CI on changes) - rust-lang#78480 (BTreeMap: fix pointer provenance rules) - rust-lang#78502 (Update Chalk to 0.36.0) - rust-lang#78513 (Infer the default host target from the host toolchain if possible) - rust-lang#78566 (Enable LLVM Polly via llvm-args.) - rust-lang#78580 (inliner: Break inlining cycles) - rust-lang#78710 (rustc_ast: Do not panic by default when visiting macro calls) - rust-lang#78746 (Demote i686-unknown-freebsd to tier 2 compiler target) - rust-lang#78830 (fix `super_visit_with` for `Terminator`) - rust-lang#78844 (Monomorphize a type argument of size-of operation during codegen) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Hi ! Sory, but how can I use this ? I execute |
This optimization pass isn't available by default in the the nightly builds. You have to clone the repo, enable it in |
Hi, I compiled with this flags:
My program is a N-body algorithm. I'm using jemallocator as default allocator. Any ideas ? Thank you. |
Check the emitted LLVM IR if they're the same. Polly won't vectorize loops if it thinks it's detrimental to performance. cargo rustc --release -- --emit=llvm-ir |
I think doing it this way is better than in #51061. Polly has other useful options and we probably don't want to create a
-Z
flag for each one of them.Benchmark
I noticed that
-lto
seems to interfere with polly in this specific microbenchmark, as enabling it causes the perf to drop to that of non-polly builds.Other related PRs: #75615