Skip to content

Consider aggressively avoiding generating memcpys for moves if we can avoid it #13707

Open
@pcwalton

Description

@pcwalton

Given that our assembler output tends to have a lot of moves in it and LLVM is bad at optimizing them out, I'm beginning to wonder if we shouldn't take more aggressive steps. For example:

  • Convert (non-POD?) by-value move parameters in the Rust ABI to be passed by reference.
  • Non-immediate values that go dead by dint of being moved into a new place should not be memcpy'd there.

Any others?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-mir-optArea: MIR optimizationsA-mir-opt-nrvoFixed by the Named Return Value Opt. (NRVO)C-enhancementCategory: An issue proposing an enhancement or a PR with one.I-slowIssue: Problems and improvements with respect to performance of generated code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions