@@ -124,7 +124,7 @@ In this table, we use the following abbreviations:
124124 either 0 or 1 on entry, and is unchanged on return).
125125
126126Functions with ``__attribute__((arm_locally_streaming)) `` are excluded from this
127- table because for the caller the attribute is synonymous to 'streaming', and
127+ table because for the caller the attribute is synonymous with 'streaming', and
128128for the callee it is merely an implementation detail that is explicitly not
129129exposed to the caller.
130130
@@ -158,7 +158,7 @@ the function's body, so that it can place the mode changes in exactly the right
158158position. The suitable place to do this seems to be SelectionDAG, where it lowers
159159the call's arguments/return values to implement the specified calling convention.
160160SelectionDAG provides Chains and Glue to specify the order of operations and give
161- preliminary control over the instruction's scheduling.
161+ preliminary control over instruction scheduling.
162162
163163
164164Example of preserving state
@@ -232,8 +232,8 @@ implement transitions from ``SC -> N`` and ``SC -> S``.
232232Unchained Function calls
233233------------------------
234234When a function with "``aarch64_pstate_sm_enabled ``" calls a function that is not
235- streaming compatible, the compiler has to insert a SMSTOP before the call and
236- insert a SMSTOP after the call.
235+ streaming compatible, the compiler has to insert an SMSTOP before the call and
236+ insert an SMSTOP after the call.
237237
238238If the function that is called is an intrinsic with no side-effects which in
239239turn is lowered to a function call (e.g., ``@llvm.cos() ``), then the call to
@@ -388,7 +388,7 @@ The value of PSTATE.SM is not controlled by the feature flags, but rather by the
388388function attributes. This means that we can compile for '``+sme ``', and the compiler
389389will code-generate any instructions, even if they are not legal under the requested
390390streaming mode. The compiler needs to use the function attributes to ensure the
391- compiler doesn't do transformations under the assumption that certain operations
391+ compiler doesn't perform transformations under the assumption that certain operations
392392are available at runtime.
393393
394394We made a conscious choice not to model this with feature flags because we
@@ -399,11 +399,11 @@ and `D121208 <https://reviews.llvm.org/D121208>`_) because of limitations in
399399TableGen.
400400
401401As a first step, this means we'll disable vectorization (LoopVectorize/SLP)
402- entirely when the a function has either of the ``aarch64_pstate_sm_enabled ``,
402+ entirely when a function has either of the ``aarch64_pstate_sm_enabled ``,
403403``aarch64_pstate_sm_body `` or ``aarch64_pstate_sm_compatible `` attributes,
404404in order to avoid the use of vector instructions.
405405
406- Later on we'll aim to relax these restrictions to enable scalable
406+ Later on, we'll aim to relax these restrictions to enable scalable
407407auto-vectorization with a subset of streaming-compatible instructions, but that
408408requires changes to the CostModel, Legalization and SelectionDAG lowering.
409409
@@ -416,7 +416,7 @@ Other things to consider
416416------------------------
417417
418418* Inlining must be disabled when the call-site needs to toggle PSTATE.SM or
419- when the callee's function body is executed in a different streaming mode than
419+ when the callee's function body is executed in a different streaming mode from
420420 its caller. This is needed because function calls are the boundaries for
421421 streaming mode changes.
422422
@@ -434,8 +434,8 @@ lazy-save mechanism for calls to private-ZA functions (i.e. functions that may
434434either directly or indirectly clobber ZA state).
435435
436436For the purpose of handling functions marked with ``aarch64_new_za ``,
437- we have introduced a new LLVM IR pass (SMEABIPass) that is run just before
438- SelectionDAG. Any such functions dealt with by this pass are marked with
437+ we have introduced a new LLVM IR pass (SMEABIPass) that runs just before
438+ SelectionDAG. Any such functions handled by this pass are marked with
439439``aarch64_expanded_pstate_za ``.
440440
441441Setting up a lazy-save
@@ -458,15 +458,15 @@ AArch64 Predicate-as-Counter Type
458458The predicate-as-counter type represents the type of a predicate-as-counter
459459value held in an AArch64 SVE predicate register. Such a value contains
460460information about the number of active lanes, the element width and a bit that
461- tells whether the generated mask should be inverted. ACLE intrinsics should be
461+ indicates whether the generated mask should be inverted. ACLE intrinsics should be
462462used to move the predicate-as-counter value to/from a predicate vector.
463463
464464There are certain limitations on the type:
465465
466466* The type can be used for function parameters and return values.
467467
468468* The supported LLVM operations on this type are limited to ``load ``, ``store ``,
469- ``phi ``, ``select `` and ``alloca `` instructions.
469+ ``phi ``, ``select ``, and ``alloca `` instructions.
470470
471471The predicate-as-counter type is a scalable type.
472472
0 commit comments