Repository navigation
docs(dialect-mir): the attributes table and source tree are the two halves #965 missed - #972
Merged
nihalpasham merged 1 commit intoAug 18, 2026
Conversation
…alves NVIDIA#965 missed NVIDIA#965 corrected this README's type and operation tables. It left the other two inventories on the same page, and both are stale in the same way -- one of them now contradicting the tables NVIDIA#965 just fixed. **Attributes: "four" -> seven.** `src/attributes.rs` has seven `#[pliron_attr(...)]` declarations; the table lists four. The three missing ones are all recent, and two pair directly with ops the README already lists: mir.fp16_attr MirFP16Attr `f16` constant values, paired with MirFP16Type mir.unroll UnrollAttr the factor carried by `mir.unroll_hint` mir.compiler_result_bundle CompilerResultBundleAttr the multi-result return ABI marker from NVIDIA#888 `mir.unroll` is the clearest case: NVIDIA#965 added `mir.unroll_hint` to the operations table, and the attribute that op exists to carry was three rows below, undocumented. **Source Layout tree.** It contradicts the page above it: types.rs "# 7 MIR types" -- the Types table now says nine attributes.rs "# 4 ... attributes" -- see above ops/ no `debug.rs` -- the Operations table now lists it src/ no `const_fold.rs`, `rust_intrinsics.rs`, `side_effects.rs` So a reader who trusted the tree came away with different numbers than a reader who trusted the tables, on one page. Three module comments were also narrower than their files (`control_flow` also carries unroll hints, `memory` also `memcpy`/`memmove`, `aggregate` also slices) -- all ops NVIDIA#965 added to the table without the tree following. Both inventories now state the rule that makes them checkable, as the operations table does: one row per `#[pliron_attr(...)]`, one tree entry per file. Verified by script against the tree: the attributes table matches all seven `(name, Rust type)` pairs exactly -- `MirCastKindAttr` is a `pub enum`, the rest are `pub struct` -- and the Source Layout tree matches `src/*.rs` plus `src/ops/*.rs` exactly, 19 files listed and 19 on disk, none missing and none invented. check-crate-inventory passes. Signed-off-by: Vyncint Ng <[email protected]>
Collaborator
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#965 corrected this README's type and operation tables. It left the other two inventories on the same page, and both are stale in the same way — one of them now contradicting the tables #965 just fixed.
Attributes: "four" → seven
src/attributes.rshas seven#[pliron_attr(...)]declarations; the table lists four. The three missing ones are all recent, and two pair directly with ops the README already lists:mir.fp16_attrMirFP16AttrMirFP16Type, already in the Types tablemir.unrollUnrollAttrmir.unroll_hint— added to the ops table by #965mir.compiler_result_bundleCompilerResultBundleAttrmir.unrollis the clearest case: #965 addedmir.unroll_hintto the operations table, and the attribute that op exists to carry sat three rows below, undocumented.Source Layout tree
It contradicts the page above it:
types.rs# 7 MIR typesattributes.rs# 4 ... attributesops/debug.rssrc/const_fold.rs,rust_intrinsics.rs,side_effects.rsSo a reader who trusted the tree came away with different numbers than one who trusted the tables, on a single page. Three module comments were also narrower than their files (
control_flowalso carries unroll hints,memoryalsomemcpy/memmove,aggregatealso slices) — all ops #965 added to the table without the tree following.Both inventories now state the rule that makes them checkable, as the operations table does: one row per
#[pliron_attr(...)], one tree entry per file.Testing
Local, no GPU.
(name, Rust type)pairs exactly by script —MirCastKindAttris apub enum, the restpub structsrc/*.rsplussrc/ops/*.rsexactly: 19 listed, 19 on disk, none missing and none inventedcheck-crate-inventory.shpassescargo oxide run <example>— not applicable, documentation only