Rematerialization
まだ誰も着手していません。
評価
調査の方向性
Issue で説明されている Function trait と Edit enum、および既存の VReg、PReg、spill、reload の処理を追跡することから始めます。複雑な rematerialization をサポートせずに、単純な定数 rematerialization のスコープを設計できるかどうかを確認します。完了には、メタデータインターフェース、rematerialization edits、spill と reload の挙動に対するカバレッジが含まれます。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 266
- フォーク
- 54
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/regalloc2 のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
bytecodealliance/regalloc2#265 · コメント 7 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
bytecodealliance/regalloc2#247 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
bytecodealliance/regalloc2#222 · コメント 4 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
bytecodealliance/regalloc2#206 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
bytecodealliance/regalloc2#194 · コメント 7 件 ·
bytecodealliance/regalloc2 の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
issue
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
web-infra-dev/rspack#15847 ·