Skip to content

Ensure loops optimize right at the LLVM level #26902

Closed
@Gankra

Description

@Gankra

This involves 4 steps:

  1. Gather up several different loop/iterator idioms that should optimize to e.g. memset/memcopy and run it through rustc -opt-level=0 --emit=llvm-ir
  2. Feed the IR from step 1 into opt -O2 -print-before-all and grab the IR from before Recognize loop idioms
  3. Write a LoopIdiomRecognize pass that handles the IR in step 2
  4. Write codegen tests for rustc that verify that the idioms are being optimized to the right IR

CC @pcwalton

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.I-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions