Use struct types during codegen in less places#105252
Conversation
|
r? @fee1-dead (rustbot has picked a reviewer for you, use r? to override) |
|
Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo |
|
r? compiler |
|
r? compiler |
| fn cleanup_landing_pad(&mut self, ty: Self::Type, pers_fn: Self::Value) -> Self::Value; | ||
| fn resume(&mut self, exn: Self::Value); | ||
| fn cleanup_landing_pad(&mut self, pers_fn: Self::Value) -> (Self::Value, Self::Value); | ||
| fn resume(&mut self, exn0: Self::Value, exn1: Self::Value); |
There was a problem hiding this comment.
Is there a more descriptive name we could give for these fields? Ultimately these values are produced by the personality function and have specific meaning, don’t they?
There was a problem hiding this comment.
They have a specific meaning (the exception object as first value and 0 as second value). But as far as the codegen backend is concerned they are just opaque values to pass back to resume. I'm not sure why the second value even exists at all. It could have been an LLVM limitation or because we used to reuse GCC's C++ personality function which uses both.
There was a problem hiding this comment.
Yeah, so we could call it something like exception_obj and dummy, but doesn’t matter much either way.
|
@bors r+ |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (37d7de3): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
…agisa Use struct types during codegen in less places This makes it easier to use cg_ssa from a backend like Cranelift that doesn't have any struct types at all. After this PR struct types are still used for function arguments and return values. Removing those usages is harder but should still be doable.
…agisa Use struct types during codegen in less places This makes it easier to use cg_ssa from a backend like Cranelift that doesn't have any struct types at all. After this PR struct types are still used for function arguments and return values. Removing those usages is harder but should still be doable.
This makes it easier to use cg_ssa from a backend like Cranelift that doesn't have any struct types at all. After this PR struct types are still used for function arguments and return values. Removing those usages is harder but should still be doable.