forked from rust-lang/rust
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add -Z orbit for forcing MIR for everything, unless #[rustc_no_mir] i…
…s used.
- Loading branch information
Showing
5 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1432,7 +1432,9 @@ impl<'blk, 'tcx> FunctionContext<'blk, 'tcx> { | |
}; | ||
|
||
let check_attrs = |attrs: &[ast::Attribute]| { | ||
attrs.iter().any(|item| item.check_name("rustc_mir")) | ||
let default_to_mir = ccx.sess().opts.debugging_opts.orbit; | ||
let invert = if default_to_mir { "rustc_no_mir" } else { "rustc_mir" }; | ||
default_to_mir ^ attrs.iter().any(|item| item.check_name(invert)) | ||
}; | ||
|
||
let use_mir = if let Some(id) = local_id { | ||
|
@@ -1464,13 +1466,13 @@ impl<'blk, 'tcx> FunctionContext<'blk, 'tcx> { | |
}; | ||
|
||
FunctionContext { | ||
needs_ret_allocas: nested_returns && mir.is_none(), | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
eddyb
Author
Owner
|
||
mir: mir, | ||
llfn: llfndecl, | ||
llretslotptr: Cell::new(None), | ||
param_env: ccx.tcx().empty_parameter_environment(), | ||
alloca_insert_pt: Cell::new(None), | ||
llreturn: Cell::new(None), | ||
needs_ret_allocas: nested_returns, | ||
landingpad_alloca: Cell::new(None), | ||
lllocals: RefCell::new(NodeMap()), | ||
llupvars: RefCell::new(NodeMap()), | ||
|
This file contains 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
this was just a bug before I guess? (the case of
nested_returns && mir.is_some()
)