Skip to content

Commit b9aa06f

Browse files
[llvm] Improve grammar and punctuation of LLVM Language Reference Manual (#149553)
1 parent 28c1433 commit b9aa06f

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

llvm/docs/LangRef.rst

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ added in the future:
410410
calling convention: on most platforms, they are not preserved and need to
411411
be saved by the caller, but on Windows, xmm6-xmm15 are preserved.
412412

413-
- On AArch64 the callee preserve all general purpose registers, except
413+
- On AArch64 the callee preserves all general purpose registers, except
414414
X0-X8 and X16-X18. Not allowed with ``nest``.
415415

416416
The idea behind this convention is to support calls to runtime functions
@@ -425,10 +425,10 @@ added in the future:
425425
on the hot path and definitely executed a lot. Furthermore `preserve_mostcc`
426426
doesn't prevent the inliner from inlining the function call.
427427

428-
This calling convention will be used by a future version of the ObjectiveC
428+
This calling convention will be used by a future version of the Objective-C
429429
runtime and should therefore still be considered experimental at this time.
430430
Although this convention was created to optimize certain runtime calls to
431-
the ObjectiveC runtime, it is not limited to this runtime and might be used
431+
the Objective-C runtime, it is not limited to this runtime and might be used
432432
by other runtimes in the future too. The current implementation only
433433
supports X86-64, but the intention is to support more architectures in the
434434
future.
@@ -455,14 +455,14 @@ added in the future:
455455
that don't need to call out to any other functions.
456456

457457
This calling convention, like the `PreserveMost` calling convention, will be
458-
used by a future version of the ObjectiveC runtime and should be considered
458+
used by a future version of the Objective-C runtime and should be considered
459459
experimental at this time.
460460
"``preserve_nonecc``" - The `PreserveNone` calling convention
461461
This calling convention doesn't preserve any general registers. So all
462462
general registers are caller saved registers. It also uses all general
463463
registers to pass arguments. This attribute doesn't impact non-general
464464
purpose registers (e.g. floating point registers, on X86 XMMs/YMMs).
465-
Non-general purpose registers still follow the standard c calling
465+
Non-general purpose registers still follow the standard C calling
466466
convention. Currently it is for x86_64 and AArch64 only.
467467
"``cxx_fast_tlscc``" - The `CXX_FAST_TLS` calling convention for access functions
468468
Clang generates an access function to access C++-style Thread Local Storage
@@ -513,7 +513,7 @@ added in the future:
513513
- On AArch64 the target address is passed in X15.
514514
"``cc <n>``" - Numbered convention
515515
Any calling convention may be specified by number, allowing
516-
target-specific calling conventions to be used. Target specific
516+
target-specific calling conventions to be used. Target-specific
517517
calling conventions start at 64.
518518

519519
More calling conventions can be added/defined on an as-needed basis, to
@@ -559,7 +559,7 @@ DLL Storage Classes
559559
-------------------
560560

561561
All Global Variables, Functions and Aliases can have one of the following
562-
DLL storage class:
562+
DLL storage classes:
563563

564564
``dllimport``
565565
"``dllimport``" causes the compiler to reference a function or variable via
@@ -569,7 +569,7 @@ DLL storage class:
569569
``dllexport``
570570
On Microsoft Windows targets, "``dllexport``" causes the compiler to provide
571571
a global pointer to a pointer in a DLL, so that it can be referenced with the
572-
``dllimport`` attribute. the pointer name is formed by combining ``__imp_``
572+
``dllimport`` attribute. The pointer name is formed by combining ``__imp_``
573573
and the function or variable name. On XCOFF targets, ``dllexport`` indicates
574574
that the symbol will be made visible to other modules using "exported"
575575
visibility and thus placed by the linker in the loader section symbol table.
@@ -586,7 +586,7 @@ Thread Local Storage Models
586586
---------------------------
587587

588588
A variable may be defined as ``thread_local``, which means that it will
589-
not be shared by threads (each thread will have a separated copy of the
589+
not be shared by threads (each thread will have a separate copy of the
590590
variable). Not all targets support thread-local variables. Optionally, a
591591
TLS model may be specified:
592592

@@ -606,10 +606,10 @@ be used. The target may choose a different TLS model if the specified
606606
model is not supported, or if a better choice of model can be made.
607607

608608
A model can also be specified in an alias, but then it only governs how
609-
the alias is accessed. It will not have any effect in the aliasee.
609+
the alias is accessed. It will not have any effect on the aliasee.
610610

611611
For platforms without linker support of ELF TLS model, the -femulated-tls
612-
flag can be used to generate GCC compatible emulated TLS code.
612+
flag can be used to generate GCC-compatible emulated TLS code.
613613

614614
.. _runtime_preemption_model:
615615

@@ -750,7 +750,7 @@ is zero. The address space qualifier must precede any other attributes.
750750

751751
LLVM allows an explicit section to be specified for globals. If the
752752
target supports it, it will emit globals to the section specified.
753-
Additionally, the global can placed in a comdat if the target has the necessary
753+
Additionally, the global can be placed in a comdat if the target has the necessary
754754
support.
755755

756756
External declarations may have an explicit section specified. Section
@@ -1316,7 +1316,7 @@ Currently, only the following parameter attributes are defined:
13161316
must be cleared off with :ref:`llvm.stackrestore
13171317
<int_stackrestore>`.
13181318

1319-
The inalloca attribute requires a type argument.
1319+
The ``inalloca`` attribute requires a type argument.
13201320

13211321
See :doc:`InAlloca` for more information on how to use this
13221322
attribute.
@@ -1328,7 +1328,7 @@ Currently, only the following parameter attributes are defined:
13281328
loads and stores to the structure may be assumed by the callee not
13291329
to trap and to be properly aligned.
13301330

1331-
The sret type argument specifies the in memory type.
1331+
The sret type argument specifies the in-memory type.
13321332

13331333
A function that accepts an ``sret`` argument must return ``void``.
13341334
A return value may not be ``sret``.
@@ -1397,7 +1397,7 @@ Currently, only the following parameter attributes are defined:
13971397
pointer. This is not a valid attribute for return values. This attribute
13981398
applies only to the particular copy of the pointer passed in this argument.
13991399

1400-
The arguments of ``captures`` is a list of captured pointer components,
1400+
The arguments of ``captures`` are a list of captured pointer components,
14011401
which may be ``none``, or a combination of:
14021402

14031403
- ``address``: The integral address of the pointer.
@@ -1429,7 +1429,7 @@ Currently, only the following parameter attributes are defined:
14291429
is null is captured in some other way.
14301430

14311431
``nofree``
1432-
This indicates that callee does not free the pointer argument. This is not
1432+
This indicates that the callee does not free the pointer argument. This is not
14331433
a valid attribute for return values.
14341434

14351435
.. _nest:
@@ -1545,7 +1545,7 @@ Currently, only the following parameter attributes are defined:
15451545
(matching the supported types for :ref:`fast-math flags <fastmath>`).
15461546
The test mask has the same format as the second argument to the
15471547
:ref:`llvm.is.fpclass <llvm.is.fpclass>`, and indicates which classes
1548-
of floating-point values are not permitted for the value. For example
1548+
of floating-point values are not permitted for the value. For example,
15491549
a bitmask of 3 indicates the parameter may not be a NaN.
15501550

15511551
If the value is a floating-point class indicated by the
@@ -1783,7 +1783,7 @@ string:
17831783

17841784
define void @f() gc "name" { ... }
17851785

1786-
The supported values of *name* includes those :ref:`built in to LLVM
1786+
The supported values of *name* include those :ref:`built in to LLVM
17871787
<builtin-gc-strategies>` and any provided by loaded plugins. Specifying a GC
17881788
strategy will cause the compiler to alter its output in order to support the
17891789
named garbage collection algorithm. Note that LLVM itself does not contain a
@@ -2056,9 +2056,9 @@ For example:
20562056
``hot``
20572057
This attribute indicates that this function is a hot spot of the program
20582058
execution. The function will be optimized more aggressively and will be
2059-
placed into special subsection of the text section to improving locality.
2059+
placed into a special subsection of the text section to improve locality.
20602060

2061-
When profile feedback is enabled, this attribute has the precedence over
2061+
When profile feedback is enabled, this attribute takes precedence over
20622062
the profile information. By marking a function ``hot``, users can work
20632063
around the cases where the training input does not have good coverage
20642064
on all the hot functions.
@@ -2162,10 +2162,10 @@ For example:
21622162
and on function declarations and definitions.
21632163
``nocallback``
21642164
This attribute indicates that the function is only allowed to jump back into
2165-
caller's module by a return or an exception, and is not allowed to jump back
2165+
the caller's module by a return or an exception, and is not allowed to jump back
21662166
by invoking a callback function, a direct, possibly transitive, external
21672167
function call, use of ``longjmp``, or other means. It is a compiler hint that
2168-
is used at module level to improve dataflow analysis, dropped during linking,
2168+
is used at the module level to improve dataflow analysis, dropped during linking,
21692169
and has no effect on functions defined in the current module.
21702170
``nodivergencesource``
21712171
A call to this function is not a source of divergence. In uniformity
@@ -2297,7 +2297,7 @@ For example:
22972297
in address-space 0 is considered to be a valid address for memory loads and
22982298
stores. Any analysis or optimization should not treat dereferencing a
22992299
pointer to ``null`` as undefined behavior in this function.
2300-
Note: Comparing address of a global variable to ``null`` may still
2300+
Note: Comparing the address of a global variable to ``null`` may still
23012301
evaluate to false because of a limitation in querying this attribute inside
23022302
constant expressions.
23032303
``optdebug``
@@ -2370,7 +2370,7 @@ For example:
23702370
This attribute controls the behavior of stack probes: either
23712371
the ``"probe-stack"`` attribute, or ABI-required stack probes, if any.
23722372
It defines the size of the guard region. It ensures that if the function
2373-
may use more stack space than the size of the guard region, stack probing
2373+
may use more stack space than the size of the guard region, a stack probing
23742374
sequence will be emitted. It takes one required integer value, which
23752375
is 4096 by default.
23762376

0 commit comments

Comments
 (0)