]> git.lizzy.rs Git - rust.git/commitdiff
[OPT] Don't force return value of call to stack
authorbjorn3 <bjorn3@users.noreply.github.com>
Fri, 20 Dec 2019 11:13:07 +0000 (12:13 +0100)
committerbjorn3 <bjorn3@users.noreply.github.com>
Fri, 20 Dec 2019 11:13:07 +0000 (12:13 +0100)
Benchmark #1: ./simple_raytracer_before
  Time (mean ± σ):     14.420 s ±  0.568 s    [User: 14.376 s, System: 0.026 s]
  Range (min … max):   13.730 s … 15.170 s    10 runs

Benchmark #2: simple_raytracer_after
  Time (mean ± σ):     13.679 s ±  0.576 s    [User: 13.628 s, System: 0.020 s]
  Range (min … max):   12.761 s … 14.552 s    10 runs

Summary
  './simple_raytracer_after' ran
    1.05 ± 0.06 times faster than './simple_raytracer_before'

src/analyze.rs

index 4d7d637eaa8e564e9dd2d141f0e205a08728bf7f..d118665b92bb30edc8867bf40788a696b15211b1 100644 (file)
@@ -30,14 +30,6 @@ pub fn analyze(fx: &FunctionCx<'_, '_, impl Backend>) -> IndexVec<Local, SsaKind
                 _ => {}
             }
         }
-
-        match &bb.terminator().kind {
-            TerminatorKind::Call {
-                destination: Some((place, _)),
-                ..
-            } => analyze_non_ssa_place(&mut flag_map, place),
-            _ => {}
-        }
     }
 
     flag_map