Skip to content

Commit 4c8a39e

Browse files
[llvm] Proofread AArch64SME.rst
1 parent 706ffa1 commit 4c8a39e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

llvm/docs/AArch64SME.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

126126
Functions 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
128128
for the callee it is merely an implementation detail that is explicitly not
129129
exposed to the caller.
130130

@@ -158,7 +158,7 @@ the function's body, so that it can place the mode changes in exactly the right
158158
position. The suitable place to do this seems to be SelectionDAG, where it lowers
159159
the call's arguments/return values to implement the specified calling convention.
160160
SelectionDAG 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

164164
Example of preserving state
@@ -232,8 +232,8 @@ implement transitions from ``SC -> N`` and ``SC -> S``.
232232
Unchained Function calls
233233
------------------------
234234
When 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

238238
If the function that is called is an intrinsic with no side-effects which in
239239
turn 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
388388
function attributes. This means that we can compile for '``+sme``', and the compiler
389389
will code-generate any instructions, even if they are not legal under the requested
390390
streaming 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
392392
are available at runtime.
393393

394394
We 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
399399
TableGen.
400400

401401
As 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,
404404
in 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
407407
auto-vectorization with a subset of streaming-compatible instructions, but that
408408
requires 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
434434
either directly or indirectly clobber ZA state).
435435

436436
For 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

441441
Setting up a lazy-save
@@ -458,15 +458,15 @@ AArch64 Predicate-as-Counter Type
458458
The predicate-as-counter type represents the type of a predicate-as-counter
459459
value held in an AArch64 SVE predicate register. Such a value contains
460460
information 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
462462
used to move the predicate-as-counter value to/from a predicate vector.
463463

464464
There 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

471471
The predicate-as-counter type is a scalable type.
472472

0 commit comments

Comments
 (0)