Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Rematerialization

Đang mở
#8 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
compilers

Hướng nghiên cứu

Bắt đầu bằng cách lần theo Function trait và Edit enum được mô tả trong issue, cùng với cách xử lý VReg, PReg, spill và reload hiện có. Xác định xem có thể thiết kế phạm vi rematerialization hằng số đơn giản mà không hỗ trợ rematerialization phức tạp hay không; công việc được xem là hoàn tất khi bao gồm giao diện metadata, các chỉnh sửa rematerialization và phạm vi bao phủ cho hành vi spill và reload.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

As an alternative to spilling and reloading, a vreg value can sometimes be recomputed from other available values. There are two ways this can be supported in regalloc2:

Simple rematerialization

Supporting rematerialization for constants, including runtime constants which only depend on pinned registers (e.g. VMContext), is relatively straightforward. The client needs to track rematerialization metadata for each VReg, after which we can elide spills for this vreg (unless there is a stack use) and replace reloads with rematerializations.

trait Function {
    fn can_rematerialize(&self, vreg: VReg) -> bool;
}

enum Edit {
    /// The code sequence for rematerialization is only allowed to
    /// use `dest` and the dedicated scratch register.
    Rematerialize {
        vreg: VReg,
        // This is not an Allocation because rematerializing
        // into a stack slot doesn't make sense.
        dest: PReg,
    }
}

Complex rematerialization

Rematerialization involving values in other vregs is more complex and probably not worth the effort of implementing. It has been done before as part of a research project on V8 but AFAIK this has not made it into the main V8 codebase.

Ngôn ngữ chính
Rust
Star
266
Fork
54
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bytecodealliance/regalloc2

Tất cả issue của bytecodealliance/regalloc2

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.