Replace scratch register with XOR swap
まだ誰も着手していません。
評価
調査の方向性
まず、MachineEnv の scratch-register 要件と、リンクされている regalloc2 の概要および続編の記事を確認します。関連するレジスタクラスと ISA に対して XOR swap が有効かどうか、また allocator に必要な動作を維持できるかどうかを判断します。scratch-register swap をこれで置き換えるべきかについて、具体的で文書化された判断に到達すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I'm getting up to snuff on compiler backend details for a personal project and the regalloc2 overview and the follow on article have been great.
I'm not going to pretend to completely understand the details here, but the MachineEnv requires a scratch register for what I gather is typically swaps, symbolically like this.
let x = 4;
let y = 5;
let swap = x;
x = y;
y = swap;
However there is a way to swap two values without introducing a third variable/register which is via an XOR swap:
x = y ^ x;
y = x ^ y;
x = y ^ x;
You shouldn't do this in high level code but should be fine in machine code of course. If an ISA allows integer operations to be applied to float registers then this can be used for both classes.
I'm nearly certain you know of this already, but I wanted to get it out there for the off chance, and if nothing else get details on why it wouldn't work.
- 主要言語
- Rust
- スター
- 266
- フォーク
- 55
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/regalloc2 のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
bytecodealliance/regalloc2#265 · コメント 9 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
bytecodealliance/regalloc2#247 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
bytecodealliance/regalloc2#222 · コメント 4 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
bytecodealliance/regalloc2#194 · コメント 7 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
bytecodealliance/regalloc2#191 · コメント 3 件 ·
bytecodealliance/regalloc2 の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Bedrock request metadata forwarding does not work for /embeddings対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug llm translation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
pytest plugin: a crashed xdist worker aborts the whole session with INTERNALERROR対応中かも @hazelxue が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
skillfs: one malformed chat-log line aborts the entire skill-usage analysis (skill_usage_from_chat_logs.py)対応中かも @zjncs が今日担当しました。 オープンcomponent:skillfs
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
agentic-os-org/ANOLISA#6116 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信