-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Add -Z small-data-threshold #117465
base: master
Are you sure you want to change the base?
Add -Z small-data-threshold #117465
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @b-naber (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
358ff44
to
42150ae
Compare
This is a more targeted version of what I was trying to achieve with #116555 (which would add |
This comment has been minimized.
This comment has been minimized.
42150ae
to
54eada2
Compare
This comment has been minimized.
This comment has been minimized.
54eada2
to
8a6e656
Compare
This comment has been minimized.
This comment has been minimized.
8a6e656
to
9f35e5f
Compare
This comment has been minimized.
This comment has been minimized.
9511b44
to
f4f0492
Compare
f4f0492
to
aefc127
Compare
Sorry for the late reply. I think this needs an MCP before it can be merged. |
☔ The latest upstream changes (presumably #118178) made this pull request unmergeable. Please resolve the merge conflicts. |
This could be merged now. Can you rebase? |
There's still some lack of clarity on the MCP zulip stream whether this is the right way to solve the problem, versus a target feature. I'll push the rebase but it's probably best to not merge it yet. |
aefc127
to
4660911
Compare
4660911
to
a618f74
Compare
OK, the conclusion on the zulip chat appeared to be that a target feature wasn't the right approach, so I think this is ready. |
@b-naber can you r+? If I understand this patch is ripe for merging. thanks. |
r? compiler-errors @bors r+ |
Funny because I was going to ask the same thing, but then I removed it. Given that someone else cares about the same thing, let's implement that warning then. @bors r- |
Where would be the most appropriate place to put that check? |
Is there a way to issue a warning if a flag's value isn't used? Given the way LLVM supports small-data thresholds in two completely different ways (arg versus module flag) we'd be duplicating the arch checks if we put a warning at the top level. If we could check after the build that the flag had been used that would be less fragile. |
@paulmenage @rustbot label: +S-inactive |
I have an updated version of this PR, but I don't see the "Reopen pull request" button (presumably because I'm not an admin on rust-lang/rust). |
You can only reopen if you force push the commit you had on this branch before closong the PR. This is a quirk of github. |
I haven't pushed a new version of the PR though, I just have it locally. The version on github is still the version from January. But I still don't have a "Reopen pull request" button on my view of the PR page. (I see that button on closed PRs on a repo for which I am an admin) |
You can try to push now |
Thanks :-) |
a618f74
to
7993112
Compare
These commits modify compiler targets. |
I'm definitely a little uncomfortable with the need to modify the numerous RiscV and MIPS targets to indicate the support for Is there a nice way to apply default target options for an architecture? (Currently the defaults all seem to be defined for an OS rather than for an arch.) |
Another option would be to have a |
☔ The latest upstream changes (presumably #128063) made this pull request unmergeable. Please resolve the merge conflicts. |
7993112
to
6e0c14f
Compare
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
Oops, some unintentional reformatting crept in there, I'll fix that. |
6e0c14f
to
d622bb2
Compare
This flag allows specifying the threshold size above which LLVM should not consider placing small objects in a .sdata or .sbss section. Support is indicated in the target options via the small-data-threshold-support, which can be either via an LLVM argument or an LLVM module flag.
d622bb2
to
06b8ea0
Compare
☔ The latest upstream changes (presumably #129750) made this pull request unmergeable. Please resolve the merge conflicts. |
This flag allows specifying the threshold size above which LLVM should not consider placing small objects in a
.sdata
or.sbss
section.Support is indicated in the target options via the small-data-threshold-support, which can (currently) be either via an LLVM argument or an LLVM module flag.