Explicitly skip arguments.
This commit is contained in:
parent
3c43b61b87
commit
38612f5ec7
1 changed files with 1 additions and 0 deletions
|
@ -97,6 +97,7 @@ impl<'tcx> crate::AnalysisDomain<'tcx> for MaybeStorageDead {
|
||||||
|
|
||||||
fn initialize_start_block(&self, body: &mir::Body<'tcx>, on_entry: &mut Self::Domain) {
|
fn initialize_start_block(&self, body: &mir::Body<'tcx>, on_entry: &mut Self::Domain) {
|
||||||
assert_eq!(body.local_decls.len(), self.always_live_locals.domain_size());
|
assert_eq!(body.local_decls.len(), self.always_live_locals.domain_size());
|
||||||
|
// Do not iterate on return place and args, as they are trivially always live.
|
||||||
for local in body.vars_and_temps_iter() {
|
for local in body.vars_and_temps_iter() {
|
||||||
if !self.always_live_locals.contains(local) {
|
if !self.always_live_locals.contains(local) {
|
||||||
on_entry.insert(local);
|
on_entry.insert(local);
|
||||||
|
|
Loading…
Add table
Reference in a new issue