Repository navigation
Revert OptimizationObjective, add more attributes to entry wrapper - #166707
Open
hanna-kruppe wants to merge 2 commits into
Open
hanna-kruppe wants to merge 2 commits into
hanna-kruppe wants to merge 2 commits into
Conversation
This reverts (parts of) commit 32a8daf, reversing changes made to e30d778. As discussed in PR 164784 after it was merged, replacing uses of `OptLevel` with a similar but distinct enum `OptimizationObjective` is misguided. Other parts of the PR were fine and are not reverted: * The codegen-llvm tests that were added * The removal of the unused CodeGenOptSize In addition, the PR included a fix to apply optsize/minsize to the entry wrapper based on global opt-level. That fix was fine too, but it's simpler to revert it along with the rest because the following commit fixes this and similar issues in a different, more general way.
Reuse `llfn_attrs_from_instance`, which despite the name does not require an `Instance` and is already used for allocator shims. Most relevant attributes were already being applied elsewhere, but we were missing optsize/minsize under global opt-level=s/z (after the previous revert) and had some duplicate code to apply certain attributes to the entry wrapper specifically. Separately, cg_ssa also re-applies certain attributes (frame pointer, target features) to the entry wrapper. I didn't change that because I'm not sure if other backends rely on it. If so, those backends may benefit from similar changes (or a larger refactoring to cg_ssa), but that's out of scope for this PR.
Contributor
Author
|
@bors try job=test-various |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 28, 2026
…=<try> Revert OptimizationObjective, add more attributes to entry wrapper try-job: test-various
hanna-kruppe
marked this pull request as ready for review
November 28, 2026 15:35
Collaborator
|
rustbot has assigned @JonathanBrouwer. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Contributor
|
💔 Test for 41119b0 failed: CI. Failed job:
|
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reverts the parts of #164784 that got pushback after it was merged, and generalizes its bug fix w.r.t. entry wrapper attributes.