Skip to content

Commit ac4bdcd

Browse files
kazutakahiratackoparkar
authored andcommitted
[llvm] Proofread several *.rst files (llvm#165835)
This patch mechanically replaces: - "i.e." with "i.e.," - "e.g." with "e.g.,"
1 parent 09c61e7 commit ac4bdcd

File tree

3 files changed

+101
-101
lines changed

3 files changed

+101
-101
lines changed

llvm/docs/CodeGenerator.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ The ``MachineBasicBlock`` class
498498
The ``MachineBasicBlock`` class contains a list of machine instructions
499499
(:raw-html:`<tt>` `MachineInstr`_ :raw-html:`</tt>` instances). It roughly
500500
corresponds to the LLVM code input to the instruction selector, but there can be
501-
a one-to-many mapping (i.e. one LLVM basic block can map to multiple machine
501+
a one-to-many mapping (i.e., one LLVM basic block can map to multiple machine
502502
basic blocks). The ``MachineBasicBlock`` class has a "``getBasicBlock``" method,
503503
which returns the LLVM basic block that it comes from.
504504

@@ -522,7 +522,7 @@ LLVM code generator can model sequences of instructions as MachineInstr
522522
bundles. A MI bundle can model a VLIW group / pack which contains an arbitrary
523523
number of parallel instructions. It can also be used to model a sequential list
524524
of instructions (potentially with data dependencies) that cannot be legally
525-
separated (e.g. ARM Thumb2 IT blocks).
525+
separated (e.g., ARM Thumb2 IT blocks).
526526

527527
Conceptually a MI bundle is a MI with a number of other MIs nested within:
528528

@@ -583,8 +583,8 @@ Packing / bundling of MachineInstrs for VLIW architectures should
583583
generally be done as part of the register allocation super-pass. More
584584
specifically, the pass which determines what MIs should be bundled
585585
together should be done after code generator exits SSA form
586-
(i.e. after two-address pass, PHI elimination, and copy coalescing).
587-
Such bundles should be finalized (i.e. adding BUNDLE MIs and input and
586+
(i.e., after two-address pass, PHI elimination, and copy coalescing).
587+
Such bundles should be finalized (i.e., adding BUNDLE MIs and input and
588588
output register MachineOperands) after virtual registers have been
589589
rewritten into physical registers. This eliminates the need to add
590590
virtual register operands to BUNDLE instructions which would
@@ -615,7 +615,7 @@ The ``MCStreamer`` API
615615
----------------------
616616

617617
MCStreamer is best thought of as an assembler API. It is an abstract API which
618-
is *implemented* in different ways (e.g. to output a ``.s`` file, output an ELF ``.o``
618+
is *implemented* in different ways (e.g., to output a ``.s`` file, output an ELF ``.o``
619619
file, etc) but whose API corresponds directly to what you see in a ``.s`` file.
620620
MCStreamer has one method per directive, such as EmitLabel, EmitSymbolAttribute,
621621
switchSection, emitValue (for .byte, .word), etc, which directly correspond to
@@ -631,7 +631,7 @@ directives through MCStreamer.
631631
On the implementation side of MCStreamer, there are two major implementations:
632632
one for writing out a ``.s`` file (MCAsmStreamer), and one for writing out a ``.o``
633633
file (MCObjectStreamer). MCAsmStreamer is a straightforward implementation
634-
that prints out a directive for each method (e.g. ``EmitValue -> .byte``), but
634+
that prints out a directive for each method (e.g., ``EmitValue -> .byte``), but
635635
MCObjectStreamer implements a full assembler.
636636

637637
For target-specific directives, the MCStreamer has a MCTargetStreamer instance.
@@ -681,7 +681,7 @@ The ``MCSection`` class
681681
-----------------------
682682

683683
The ``MCSection`` class represents an object-file specific section. It is
684-
subclassed by object file specific implementations (e.g. ``MCSectionMachO``,
684+
subclassed by object file specific implementations (e.g., ``MCSectionMachO``,
685685
``MCSectionCOFF``, ``MCSectionELF``) and these are created and uniqued by
686686
MCContext. The MCStreamer has a notion of the current section, which can be
687687
changed with the SwitchToSection method (which corresponds to a ".section"
@@ -696,7 +696,7 @@ The ``MCInst`` class is a target-independent representation of an instruction.
696696
It is a simple class (much more so than `MachineInstr`_) that holds a
697697
target-specific opcode and a vector of MCOperands. MCOperand, in turn, is a
698698
simple discriminated union of three cases: 1) a simple immediate, 2) a target
699-
register ID, 3) a symbolic expression (e.g. "``Lfoo-Lbar+42``") as an MCExpr.
699+
register ID, 3) a symbolic expression (e.g., "``Lfoo-Lbar+42``") as an MCExpr.
700700

701701
MCInst is the common currency used to represent machine instructions at the MC
702702
layer. It is the type used by the instruction encoder, the instruction printer,
@@ -711,9 +711,9 @@ The MC layer's object writers support a variety of object formats. Because of
711711
target-specific aspects of object formats each target only supports a subset of
712712
the formats supported by the MC layer. Most targets support emitting ELF
713713
objects. Other vendor-specific objects are generally supported only on targets
714-
that are supported by that vendor (i.e. MachO is only supported on targets
714+
that are supported by that vendor (i.e., MachO is only supported on targets
715715
supported by Darwin, and XCOFF is only supported on targets that support AIX).
716-
Additionally some targets have their own object formats (i.e. DirectX, SPIR-V
716+
Additionally some targets have their own object formats (i.e., DirectX, SPIR-V
717717
and WebAssembly).
718718

719719
The table below captures a snapshot of object file support in LLVM:
@@ -769,7 +769,7 @@ Introduction to SelectionDAGs
769769

770770
The SelectionDAG provides an abstraction for code representation in a way that
771771
is amenable to instruction selection using automatic techniques
772-
(e.g. dynamic-programming based optimal pattern matching selectors). It is also
772+
(e.g., dynamic-programming based optimal pattern matching selectors). It is also
773773
well-suited to other phases of code generation; in particular, instruction
774774
scheduling (SelectionDAG's are very close to scheduling DAGs post-selection).
775775
Additionally, the SelectionDAG provides a host representation where a large
@@ -898,7 +898,7 @@ Initial SelectionDAG Construction
898898
The initial SelectionDAG is na\ :raw-html:`&iuml;`\ vely peephole expanded from
899899
the LLVM input by the ``SelectionDAGBuilder`` class. The intent of this pass
900900
is to expose as much low-level, target-specific details to the SelectionDAG as
901-
possible. This pass is mostly hard-coded (e.g. an LLVM ``add`` turns into an
901+
possible. This pass is mostly hard-coded (e.g., an LLVM ``add`` turns into an
902902
``SDNode add`` while a ``getelementptr`` is expanded into the obvious
903903
arithmetic). This pass requires target-specific hooks to lower calls, returns,
904904
varargs, etc. For these features, the :raw-html:`<tt>` `TargetLowering`_
@@ -944,7 +944,7 @@ The Legalize phase is in charge of converting a DAG to only use the operations
944944
that are natively supported by the target.
945945

946946
Targets often have weird constraints, such as not supporting every operation on
947-
every supported data type (e.g. X86 does not support byte conditional moves and
947+
every supported data type (e.g., X86 does not support byte conditional moves and
948948
PowerPC does not support sign-extending loads from a 16-bit memory location).
949949
Legalize takes care of this by open-coding another sequence of operations to
950950
emulate the operation ("expansion"), by promoting one type to a larger type that
@@ -995,7 +995,7 @@ SelectionDAG Optimization Phase: the DAG Combiner
995995

996996
The SelectionDAG optimization phase is run multiple times for code generation,
997997
immediately after the DAG is built and once after each legalization. The first
998-
run of the pass allows the initial code to be cleaned up (e.g. performing
998+
run of the pass allows the initial code to be cleaned up (e.g., performing
999999
optimizations that depend on knowing that the operators have restricted type
10001000
inputs). Subsequent runs of the pass clean up the messy code generated by the
10011001
Legalize passes, which allows Legalize to be very simple (it can focus on making
@@ -1120,10 +1120,10 @@ for your target. It has the following strengths:
11201120
16-bits of the immediate).
11211121

11221122
* When using the 'Pat' class to map a pattern to an instruction that has one
1123-
or more complex operands (like e.g. `X86 addressing mode`_), the pattern may
1123+
or more complex operands (like e.g., `X86 addressing mode`_), the pattern may
11241124
either specify the operand as a whole using a ``ComplexPattern``, or else it
11251125
may specify the components of the complex operand separately. The latter is
1126-
done e.g. for pre-increment instructions by the PowerPC back end:
1126+
done e.g., for pre-increment instructions by the PowerPC back end:
11271127

11281128
::
11291129

@@ -1145,13 +1145,13 @@ While it has many strengths, the system currently has some limitations,
11451145
primarily because it is a work in progress and is not yet finished:
11461146

11471147
* Overall, there is no way to define or match SelectionDAG nodes that define
1148-
multiple values (e.g. ``SMUL_LOHI``, ``LOAD``, ``CALL``, etc). This is the
1148+
multiple values (e.g., ``SMUL_LOHI``, ``LOAD``, ``CALL``, etc). This is the
11491149
biggest reason that you currently still *have to* write custom C++ code
11501150
for your instruction selector.
11511151

11521152
* There is no great way to support matching complex addressing modes yet. In
11531153
the future, we will extend pattern fragments to allow them to define multiple
1154-
values (e.g. the four operands of the `X86 addressing mode`_, which are
1154+
values (e.g., the four operands of the `X86 addressing mode`_, which are
11551155
currently matched with custom C++ code). In addition, we'll extend fragments
11561156
so that a fragment can match multiple different patterns.
11571157

@@ -1175,7 +1175,7 @@ SelectionDAG Scheduling and Formation Phase
11751175

11761176
The scheduling phase takes the DAG of target instructions from the selection
11771177
phase and assigns an order. The scheduler can pick an order depending on
1178-
various constraints of the machines (i.e. order for minimal register pressure or
1178+
various constraints of the machines (i.e., order for minimal register pressure or
11791179
try to cover instruction latencies). Once an order is established, the DAG is
11801180
converted to a list of :raw-html:`<tt>` `MachineInstr`_\s :raw-html:`</tt>` and
11811181
the SelectionDAG is destroyed.
@@ -1615,7 +1615,7 @@ Since the MC layer works at the level of abstraction of object files, it doesn't
16151615
have a notion of functions, global variables etc. Instead, it thinks about
16161616
labels, directives, and instructions. A key class used at this time is the
16171617
MCStreamer class. This is an abstract API that is implemented in different ways
1618-
(e.g. to output a ``.s`` file, output an ELF ``.o`` file, etc) that is effectively an
1618+
(e.g., to output a ``.s`` file, output an ELF ``.o`` file, etc) that is effectively an
16191619
"assembler API". MCStreamer has one method per directive, such as EmitLabel,
16201620
EmitSymbolAttribute, switchSection, etc, which directly correspond to assembly
16211621
level directives.

0 commit comments

Comments
 (0)