@@ -498,7 +498,7 @@ The ``MachineBasicBlock`` class
498498The ``MachineBasicBlock `` class contains a list of machine instructions
499499(:raw-html: `<tt >` `MachineInstr `_ :raw-html: `</tt >` instances). It roughly
500500corresponds 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
502502basic blocks). The ``MachineBasicBlock `` class has a "``getBasicBlock ``" method,
503503which returns the LLVM basic block that it comes from.
504504
@@ -522,7 +522,7 @@ LLVM code generator can model sequences of instructions as MachineInstr
522522bundles. A MI bundle can model a VLIW group / pack which contains an arbitrary
523523number of parallel instructions. It can also be used to model a sequential list
524524of 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
527527Conceptually 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
583583generally be done as part of the register allocation super-pass. More
584584specifically, the pass which determines what MIs should be bundled
585585together 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
588588output register MachineOperands) after virtual registers have been
589589rewritten into physical registers. This eliminates the need to add
590590virtual register operands to BUNDLE instructions which would
@@ -615,7 +615,7 @@ The ``MCStreamer`` API
615615----------------------
616616
617617MCStreamer 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 ``
619619file, etc) but whose API corresponds directly to what you see in a ``.s `` file.
620620MCStreamer has one method per directive, such as EmitLabel, EmitSymbolAttribute,
621621switchSection, emitValue (for .byte, .word), etc, which directly correspond to
@@ -631,7 +631,7 @@ directives through MCStreamer.
631631On the implementation side of MCStreamer, there are two major implementations:
632632one for writing out a ``.s `` file (MCAsmStreamer), and one for writing out a ``.o ``
633633file (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
635635MCObjectStreamer implements a full assembler.
636636
637637For target-specific directives, the MCStreamer has a MCTargetStreamer instance.
@@ -681,7 +681,7 @@ The ``MCSection`` class
681681-----------------------
682682
683683The ``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
686686MCContext. The MCStreamer has a notion of the current section, which can be
687687changed with the SwitchToSection method (which corresponds to a ".section"
@@ -696,7 +696,7 @@ The ``MCInst`` class is a target-independent representation of an instruction.
696696It is a simple class (much more so than `MachineInstr `_) that holds a
697697target-specific opcode and a vector of MCOperands. MCOperand, in turn, is a
698698simple 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
701701MCInst is the common currency used to represent machine instructions at the MC
702702layer. 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
711711target-specific aspects of object formats each target only supports a subset of
712712the formats supported by the MC layer. Most targets support emitting ELF
713713objects. 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
715715supported 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
717717and WebAssembly).
718718
719719The table below captures a snapshot of object file support in LLVM:
@@ -769,7 +769,7 @@ Introduction to SelectionDAGs
769769
770770The SelectionDAG provides an abstraction for code representation in a way that
771771is 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
773773well-suited to other phases of code generation; in particular, instruction
774774scheduling (SelectionDAG's are very close to scheduling DAGs post-selection).
775775Additionally, the SelectionDAG provides a host representation where a large
@@ -898,7 +898,7 @@ Initial SelectionDAG Construction
898898The initial SelectionDAG is na\ :raw-html: `ï ; `\ vely peephole expanded from
899899the LLVM input by the ``SelectionDAGBuilder `` class. The intent of this pass
900900is 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
903903arithmetic). This pass requires target-specific hooks to lower calls, returns,
904904varargs, 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
944944that are natively supported by the target.
945945
946946Targets 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
948948PowerPC does not support sign-extending loads from a 16-bit memory location).
949949Legalize takes care of this by open-coding another sequence of operations to
950950emulate the operation ("expansion"), by promoting one type to a larger type that
@@ -995,7 +995,7 @@ SelectionDAG Optimization Phase: the DAG Combiner
995995
996996The SelectionDAG optimization phase is run multiple times for code generation,
997997immediately 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
999999optimizations that depend on knowing that the operators have restricted type
10001000inputs). Subsequent runs of the pass clean up the messy code generated by the
10011001Legalize 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,
11451145primarily 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
11761176The scheduling phase takes the DAG of target instructions from the selection
11771177phase 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
11791179try to cover instruction latencies). Once an order is established, the DAG is
11801180converted to a list of :raw-html: `<tt >` `MachineInstr `_\s :raw-html: `</tt >` and
11811181the SelectionDAG is destroyed.
@@ -1615,7 +1615,7 @@ Since the MC layer works at the level of abstraction of object files, it doesn't
16151615have a notion of functions, global variables etc. Instead, it thinks about
16161616labels, directives, and instructions. A key class used at this time is the
16171617MCStreamer 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,
16201620EmitSymbolAttribute, switchSection, etc, which directly correspond to assembly
16211621level directives.
0 commit comments