Support for cold blocks
まだ誰も着手していません。
評価
調査の方向性
まず、bundle のマージと split point を決定する blockparams_out、および block-ordering と register-allocation のエントリポイントを見つけます。cold block にマークを付けて通常のブロックの後に並べられる方法を追跡し、その後、RPO に依存するヒューリスティクスへの影響を評価します。spills と moves が割り当てを壊すことなく cold block を優先すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
It would be useful to be able to mark some blocks as "cold" which means that they are rarely taken cold paths. The register allocator should prefer placing spills and moves in cold blocks if possible.
It turns out that very little needs to be done if we take advantage of the block ordering by requiring all cold blocks to be after normal blocks in terms of block index and instruction indices. This has the following consequences:
- Due to the sorting of
blockparams_out, bundle merging will attempt to merge all branch parameters coming from normal blocks before attempting to merge ones coming from cold blocks. - If a requirement conflict exists within a bundle, the bundle is split at the first conflict point. Since ranges are iterated in order, this will place the split in a cold block if there are no conflicts within normal blocks.
- If register allocation requires splitting a bundle, the first conflict point is used as the split point. Same as above.
My only concern is that the block order will no longer be in RPO which is the ordering recommended by the documentation. While regalloc2 will still function properly, I am less sure of the impact it may have on the heuristics.
Note that there are no requirements related to the ordering of blocks, and there is no requirement that the control flow be reducible. Some heuristics used by the allocator will perform better if the code is reducible and ordered in reverse postorder (RPO), however: in particular, (1) this interacts better with the contiguous-range-of-instruction-indices live range representation that we use, and (2) the "approximate loop depth" metric will actually be exact if both these conditions are met.
- 主要言語
- Rust
- スター
- 266
- フォーク
- 54
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/regalloc2 のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
bytecodealliance/regalloc2#265 · コメント 8 件 ·
-
難易度 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
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yantrikos/yantrik-os#255 ·
-
bug CLI custom-model
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
raphamorim/rio#1956 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
rust-bitcoin/rust-bitcoin#6930 · コメント 1 件 ·