Docs: PR 29's comments say what is true now and keep to 100 columns
The fix-forward of PR 29's reading (lane pr29read; docs only, no code):
- engine_stack_return_aggregate.rs says it compiles on one profile, `nvidia-rtx50-linux`, and
that its expectations row holds the fixture to `ok` on every committed profile, as the
converter-flags engine test does since d3316d621e.
- canon/aggregates.rs's module doc drops "left whole, it was refused" (history); the refusal a
whole access of a larger aggregate meets is named where the doc says lowering refuses it.
- The PR's new comment lines over 100 columns are wrapped: aggregates.rs's opening paragraph,
canon/mod.rs's pass list and its call-site comment, and tests/aggregates.rs's module doc.
Checked: cargo fmt --all makes no change; the comment lines the PR added are at most 100
columns.
This commit is contained in:
1 parent
8f117956ef
commit
3c3d214397
4 files changed
+22
-19
No files matched your search
@@ -3,22 +3,22 @@
|
||||
//! An LLVM `load` or `store` may move a whole array or struct (`load [4 x <4 x float>], ptr
|
||||
//! addrspace(2) %p`): Metal's own linker emits one where it passes a field of a buffer's struct to
|
||||
//! a function by value, and a converter-built vertex function's return value is one stored to and
|
||||
//! loaded from a stack allocation. Lowering reads and writes buffer, threadgroup and stack memory
|
||||
//! a scalar or vector at a time. After SCCP, [`expand`] replaces each such access, in its place, by its members' (the
|
||||
//! scalars and vectors the type holds, in layout order): a `getelementptr i8` at the member's
|
||||
//! constant byte distance from the access's pointer (none at distance 0), and a load chained into
|
||||
//! the aggregate by `insertvalue`, starting from `undef`; a store's members are each an
|
||||
//! `extractvalue` and a store. A member's alignment is the access's, lowered to the largest power
|
||||
//! of two dividing its distance; an access that states none leaves its members' unstated (each
|
||||
//! member's ABI alignment, which its offset in the layout honours).
|
||||
//! loaded from a stack allocation. Lowering reads and writes buffer, threadgroup and stack memory a
|
||||
//! scalar or vector at a time. After SCCP, [`expand`] replaces each such access, in its place, by
|
||||
//! its members' (the scalars and vectors the type holds, in layout order): a `getelementptr i8` at
|
||||
//! the member's constant byte distance from the access's pointer (none at distance 0), and a load
|
||||
//! chained into the aggregate by `insertvalue`, starting from `undef`; a store's members are each
|
||||
//! an `extractvalue` and a store. A member's alignment is the access's, lowered to the largest
|
||||
//! power of two dividing its distance; an access that states none leaves its members' unstated
|
||||
//! (each member's ABI alignment, which its offset in the layout honours).
|
||||
//!
|
||||
//! What is split: a non-volatile, non-atomic access in `device`, `constant`, `threadgroup` or
|
||||
//! `thread` memory of an array or struct that holds no pointer, with at least one and at most
|
||||
//! [`MAX_MEMBERS`] members, nested at most [`MAX_DEPTH`] deep. The rest stays whole: a pointer
|
||||
//! member (a handle or a resource) is lowering's to follow, and lowering holds no larger
|
||||
//! aggregate, so it refuses the access. A stack allocation's whole-aggregate access is split like
|
||||
//! the rest because lowering holds only scalars and vectors there too: left whole, it was refused
|
||||
//! as `Lowering(Access)` `AccessType`.
|
||||
//! aggregate, so it refuses the access (`Lowering(Access)` `AccessType`). A stack allocation's
|
||||
//! whole-aggregate access is split like the rest because lowering holds only scalars and vectors
|
||||
//! there too.
|
||||
|
||||
use crate::budget::Meter;
|
||||
use crate::error::Error;
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
//! through the call's map pointer and Apple's arithmetic. **AIR 2.7 simdgroup-matrix block loads and
|
||||
//! stores** take their AIR 2.8 form, their extent, stride and origin built from the elements per
|
||||
//! row, the origin and the constant transpose flag (`legacy_matrix`). **Aggregate accesses**: a
|
||||
//! load or store of a whole array or struct in buffer, threadgroup or stack memory becomes its scalar
|
||||
//! and vector members' accesses, joined by `insertvalue` or split by `extractvalue`
|
||||
//! load or store of a whole array or struct in buffer, threadgroup or stack memory becomes its
|
||||
//! scalar and vector members' accesses, joined by `insertvalue` or split by `extractvalue`
|
||||
//! (`aggregates`). **Constant references**: in a kernel, each plain load of a scalar or vector
|
||||
//! from a `constant T&` parameter's object, at an offset fixed at translation time, is made in
|
||||
//! the entry block where nothing on any path before it may write device memory and no other
|
||||
@@ -764,7 +764,8 @@ pub fn specialize_dynamic(
|
||||
// in plain AIR, each OpenCL C `mad` call its multiply and addition, and each `mul24` and
|
||||
// `mad24` call the 32-bit product of its operands' low 24 bits (and the addition).
|
||||
let body = routine::expand(body, &mut parts, m)?;
|
||||
// Aggregate loads and stores of buffer, threadgroup and stack memory as their members' accesses.
|
||||
// Aggregate loads and stores of buffer, threadgroup and stack memory as their members'
|
||||
// accesses.
|
||||
let body = aggregates::expand(body, &mut parts, func, m)?;
|
||||
// A kernel's plain loads of its constant references, made in its entry block where nothing
|
||||
// before them may write device memory.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//! Aggregate loads and stores of buffer, threadgroup and stack memory, split into their members' accesses
|
||||
//! (`canon::aggregates`).
|
||||
//! Aggregate loads and stores of buffer, threadgroup and stack memory, split into their members'
|
||||
//! accesses (`canon::aggregates`).
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
//! A vertex function that builds its return value in a stack slot compiles.
|
||||
//! A vertex function that builds its return value in a stack slot compiles on one profile.
|
||||
//!
|
||||
//! The owned fixture `vertex_stack_return_aggregate` stores a zeroinitializer struct to an
|
||||
//! alloca, writes its members, and loads the whole struct back, the shape seen in modules Apple's
|
||||
//! Metal shader converter wrote. `llvm-as` assembles the fixture; a missing tool skips
|
||||
//! visibly.
|
||||
//! Metal shader converter wrote. This test compiles, links and validates it on
|
||||
//! `nvidia-rtx50-linux` alone; its row in `tests/public_fixture_expectations_engine.tsv` holds it to
|
||||
//! `ok` on every committed profile (`public_fixtures_engine`). `llvm-as` assembles the fixture; a
|
||||
//! missing tool skips visibly.
|
||||
|
||||
use crate::pipeline::testing::{
|
||||
compile, fixtures_dir, link_and_validate, llvm_assemble, profile, AssembleError,
|
||||
|
||||
Reference in new issue
Block a user