Improve codegen of large Copy parameters under CopyProp to match DestinationPropagation #108068
Labels
A-codegen
Area: Code generation
A-mir-opt
Area: MIR optimizations
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
This will probably bitrot, but this is a working godbolt link at the moment: https://godbolt.org/z/v446e66jG
Currently this program:
Compiles to this IR:
But if we pass
-Zmir-enable-passes=+DestinationPropagation
, we eliminate amemcpy
:But with
CopyProp
enabled, we do not manage this optimization. This is probably a coordination problem between codegen, MIR optimizations, and MIR semantics: #105813 (comment)The text was updated successfully, but these errors were encountered: