Skip to content

Commit

Permalink
Also allow returning PassMode::ByValPair directly into an ssa var
Browse files Browse the repository at this point in the history
Benchmark #1: ./raytracer_cg_clif_pre
  Time (mean ± σ):      8.251 s ±  0.021 s    [User: 8.245 s, System: 0.005 s]
  Range (min … max):    8.225 s …  8.292 s    10 runs

Benchmark #2: ./raytracer_cg_clif_post
  Time (mean ± σ):      8.206 s ±  0.043 s    [User: 8.199 s, System: 0.007 s]
  Range (min … max):    8.168 s …  8.279 s    10 runs
  • Loading branch information
bjorn3 committed Sep 23, 2020
1 parent a12f601 commit 934d56a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/abi/returning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ pub(crate) fn can_return_to_ssa_var<'tcx>(
dest_layout: TyAndLayout<'tcx>,
) -> bool {
match get_pass_mode(tcx, dest_layout) {
PassMode::NoPass | PassMode::ByVal(_) => true,
// FIXME Make it possible to return ByValPair and ByRef to an ssa var.
PassMode::ByValPair(_, _) | PassMode::ByRef { size: _ } => false,
PassMode::NoPass | PassMode::ByVal(_) | PassMode::ByValPair(_, _) => true,
// FIXME Make it possible to return ByRef to an ssa var.
PassMode::ByRef { size: _ } => false,
}
}

Expand Down

0 comments on commit 934d56a

Please sign in to comment.