Stop needing materialized places for most intrinsics#156116
Stop needing materialized places for most intrinsics#156116scottmcm wants to merge 2 commits intorust-lang:mainfrom
Conversation
0bc61de to
a8a0062
Compare
This comment has been minimized.
This comment has been minimized.
a8a0062 to
7a7f99b
Compare
This comment has been minimized.
This comment has been minimized.
7a7f99b to
1f0a500
Compare
This comment has been minimized.
This comment has been minimized.
1f0a500 to
6eb4607
Compare
This comment has been minimized.
This comment has been minimized.
6eb4607 to
e19fd5d
Compare
This comment has been minimized.
This comment has been minimized.
e19fd5d to
2f79728
Compare
This comment has been minimized.
This comment has been minimized.
2f79728 to
10f00b6
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Stop needing materialized places for most intrinsics
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (ce9f4cc): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -1.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.1%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 496.439s -> 493.878s (-0.52%) |
|
r? codegen |
|
The GCC codegen subtree was changed |
| let func_ty = func.ty(&self.fx.mir.local_decls, tcx); | ||
| if let ty::FnDef(def_id, _args) = *func_ty.kind() | ||
| && let Some(intrinsic) = tcx.intrinsic(def_id) | ||
| && self.fx.cx.intrinsic_call_expects_place_always(intrinsic.name) |
There was a problem hiding this comment.
annot: needing this check is unfortunate here, since we have to do it for all Calls. But perf says it doesn't cause a regression, so I think it's fine for now to keep this PR manageable, and we can hopefully remove it eventually with more updates to the backends.
(Worst come to worst the backends can make their own allocas for some intrinsics if really necessary. And extra typed copy on some intrinsics occasionally would be well worth it to get not making all the unnecessary ones on most of the intrinsics.)
|
☔ The latest upstream changes (presumably #156166) made this pull request unmergeable. Please resolve the merge conflicts. |
Today even to return a constant from
size_of_valit takes analloca. That's wasteful.This updates the cg_ssa traits to allow returning an
OperandValueinstead, which is possible for the vast majority of intrinsics -- this PR moves all but 5 over to doing that in LLVM.The first commit adds a test to help show the difference here.
cc rust-lang/compiler-team#970 #153250