Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 23b10ee

Browse files
clubby789WaffleLapkin
andcommittedJan 23, 2025·
Disable non-required MIR opts with optimize(none)
Co-authored-by: Waffle Lapkin <[email protected]>
1 parent cd848c9 commit 23b10ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+319
-10
lines changed
 

‎compiler/rustc_attr_data_structures/src/attributes.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ pub enum OptimizeAttr {
4646
Size,
4747
}
4848

49+
impl OptimizeAttr {
50+
pub fn do_not_optimize(&self) -> bool {
51+
matches!(self, Self::DoNotOptimize)
52+
}
53+
}
54+
4955
#[derive(Clone, Debug, Encodable, Decodable)]
5056
pub enum DiagnosticAttribute {
5157
// tidy-alphabetical-start

‎compiler/rustc_mir_transform/src/abort_unwinding_calls.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,8 @@ impl<'tcx> crate::MirPass<'tcx> for AbortUnwindingCalls {
116116
// We may have invalidated some `cleanup` blocks so clean those up now.
117117
super::simplify::remove_dead_blocks(body);
118118
}
119+
120+
fn is_required(&self) -> bool {
121+
true
122+
}
119123
}

0 commit comments

Comments
 (0)
Please sign in to comment.