@@ -90,8 +90,8 @@ This design has two important implications. The first is that LLVM can support
90
90
completely non-traditional code generation targets. For example, the C backend
91
91
does not require register allocation, instruction selection, or any of the other
92
92
standard components provided by the system. As such, it only implements these
93
- two interfaces, and does its own thing. Note that C backend was removed from the
94
- trunk since LLVM 3.1 release. Another example of a code generator like this is a
93
+ two interfaces, and does its own thing. Note that the C backend was removed from the
94
+ trunk in the LLVM 3.1 release. Another example of a code generator like this is a
95
95
(purely hypothetical) backend that converts LLVM to the GCC RTL form and uses
96
96
GCC to emit machine code for a target.
97
97
@@ -565,7 +565,7 @@ Conceptually a MI bundle is a MI with a number of other MIs nested within:
565
565
MI bundle support does not change the physical representations of
566
566
MachineBasicBlock and MachineInstr. All the MIs (including top level and nested
567
567
ones) are stored as sequential list of MIs. The "bundled" MIs are marked with
568
- the 'InsideBundle' flag. A top level MI with the special BUNDLE opcode is used
568
+ the 'InsideBundle' flag. A top- level MI with the special BUNDLE opcode is used
569
569
to represent the start of a bundle. It's legal to mix BUNDLE MIs with individual
570
570
MIs that are not inside bundles nor represent bundles.
571
571
@@ -575,7 +575,7 @@ The MachineBasicBlock iterator has been modified to skip over bundled MIs to
575
575
enforce the bundle-as-a-single-unit concept. An alternative iterator
576
576
instr_iterator has been added to MachineBasicBlock to allow passes to iterate
577
577
over all of the MIs in a MachineBasicBlock, including those which are nested
578
- inside bundles. The top level BUNDLE instruction must have the correct set of
578
+ inside bundles. The top- level BUNDLE instruction must have the correct set of
579
579
register MachineOperand's that represent the cumulative inputs and outputs of
580
580
the bundled MIs.
581
581
@@ -602,7 +602,7 @@ level, devoid of "high level" information like "constant pools", "jump tables",
602
602
"global variables" or anything like that. At this level, LLVM handles things
603
603
like label names, machine instructions, and sections in the object file. The
604
604
code in this layer is used for a number of important purposes: the tail end of
605
- the code generator uses it to write a .s or .o file, and it is also used by the
605
+ the code generator uses it to write a `` .s `` or `` .o `` file, and it is also used by the
606
606
llvm-mc tool to implement standalone machine code assemblers and disassemblers.
607
607
608
608
This section describes some of the important classes. There are also a number
@@ -615,8 +615,8 @@ The ``MCStreamer`` API
615
615
----------------------
616
616
617
617
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
619
- file, etc) but whose API correspond directly to what you see in a .s file.
618
+ is *implemented * in different ways (e.g. to output a `` .s `` file, output an ELF `` .o ``
619
+ file, etc) but whose API corresponds directly to what you see in a `` .s `` file.
620
620
MCStreamer has one method per directive, such as EmitLabel, EmitSymbolAttribute,
621
621
switchSection, emitValue (for .byte, .word), etc, which directly correspond to
622
622
assembly level directives. It also has an EmitInstruction method, which is used
@@ -629,7 +629,7 @@ higher level LLVM IR and Machine* constructs down to the MC layer, emitting
629
629
directives through MCStreamer.
630
630
631
631
On the implementation side of MCStreamer, there are two major implementations:
632
- one for writing out a .s file (MCAsmStreamer), and one for writing out a .o
632
+ one for writing out a `` .s `` file (MCAsmStreamer), and one for writing out a `` .o ``
633
633
file (MCObjectStreamer). MCAsmStreamer is a straightforward implementation
634
634
that prints out a directive for each method (e.g. ``EmitValue -> .byte ``), but
635
635
MCObjectStreamer implements a full assembler.
@@ -639,7 +639,7 @@ Each target that needs it defines a class that inherits from it and is a lot
639
639
like MCStreamer itself: It has one method per directive and two classes that
640
640
inherit from it, a target object streamer and a target asm streamer. The target
641
641
asm streamer just prints it (``emitFnStart -> .fnstart ``), and the object
642
- streamer implement the assembler logic for it.
642
+ streamer implements the assembler logic for it.
643
643
644
644
To make llvm use these classes, the target initialization must call
645
645
TargetRegistry::RegisterAsmStreamer and TargetRegistry: :RegisterMCObjectStreamer
@@ -667,7 +667,7 @@ MCSymbols are created by MCContext and uniqued there. This means that MCSymbols
667
667
can be compared for pointer equivalence to find out if they are the same symbol.
668
668
Note that pointer inequality does not guarantee the labels will end up at
669
669
different addresses though. It's perfectly legal to output something like this
670
- to the .s file:
670
+ to the `` .s `` file:
671
671
672
672
::
673
673
@@ -685,7 +685,7 @@ subclassed by object file specific implementations (e.g. ``MCSectionMachO``,
685
685
``MCSectionCOFF ``, ``MCSectionELF ``) and these are created and uniqued by
686
686
MCContext. The MCStreamer has a notion of the current section, which can be
687
687
changed with the SwitchToSection method (which corresponds to a ".section"
688
- directive in a .s file).
688
+ directive in a `` .s `` file).
689
689
690
690
.. _MCInst :
691
691
@@ -887,7 +887,7 @@ bundled into a single scheduling-unit node, and with immediate operands and
887
887
other nodes that aren't relevant for scheduling omitted.
888
888
889
889
The option ``-filter-view-dags `` allows to select the name of the basic block
890
- that you are interested to visualize and filters all the previous
890
+ that you are interested in visualizing and filters all the previous
891
891
``view-*-dags `` options.
892
892
893
893
.. _Build initial DAG :
@@ -944,7 +944,7 @@ The Legalize phase is in charge of converting a DAG to only use the operations
944
944
that are natively supported by the target.
945
945
946
946
Targets often have weird constraints, such as not supporting every operation on
947
- every supported datatype (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
948
948
PowerPC does not support sign-extending loads from a 16-bit memory location).
949
949
Legalize takes care of this by open-coding another sequence of operations to
950
950
emulate the operation ("expansion"), by promoting one type to a larger type that
@@ -1077,7 +1077,7 @@ for your target. It has the following strengths:
1077
1077
if your patterns make sense or not.
1078
1078
1079
1079
* It can handle arbitrary constraints on operands for the pattern match. In
1080
- particular, it is straight-forward to say things like "match any immediate
1080
+ particular, it is straightforward to say things like "match any immediate
1081
1081
that is a 13-bit sign-extended value". For examples, see the ``immSExt16 ``
1082
1082
and related ``tblgen `` classes in the PowerPC backend.
1083
1083
@@ -1615,7 +1615,7 @@ Since the MC layer works at the level of abstraction of object files, it doesn't
1615
1615
have a notion of functions, global variables etc. Instead, it thinks about
1616
1616
labels, directives, and instructions. A key class used at this time is the
1617
1617
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
1619
1619
"assembler API". MCStreamer has one method per directive, such as EmitLabel,
1620
1620
EmitSymbolAttribute, switchSection, etc, which directly correspond to assembly
1621
1621
level directives.
@@ -1648,7 +1648,7 @@ three important things that you have to implement for your target:
1648
1648
1649
1649
Finally, at your choosing, you can also implement a subclass of MCCodeEmitter
1650
1650
which lowers MCInst's into machine code bytes and relocations. This is
1651
- important if you want to support direct .o file emission, or would like to
1651
+ important if you want to support direct `` .o `` file emission, or would like to
1652
1652
implement an assembler for your target.
1653
1653
1654
1654
Emitting function stack size information
@@ -1678,7 +1678,7 @@ Instructions in a VLIW target can typically be mapped to multiple functional
1678
1678
units. During the process of packetizing, the compiler must be able to reason
1679
1679
about whether an instruction can be added to a packet. This decision can be
1680
1680
complex since the compiler has to examine all possible mappings of instructions
1681
- to functional units. Therefore to alleviate compilation-time complexity, the
1681
+ to functional units. Therefore, to alleviate compilation-time complexity, the
1682
1682
VLIW packetizer parses the instruction classes of a target and generates tables
1683
1683
at compiler build time. These tables can then be queried by the provided
1684
1684
machine-independent API to determine if an instruction can be accommodated in a
@@ -1729,7 +1729,7 @@ Instruction Alias Processing
1729
1729
----------------------------
1730
1730
1731
1731
Once the instruction is parsed, it enters the MatchInstructionImpl function.
1732
- The MatchInstructionImpl function performs alias processing and then does actual
1732
+ The MatchInstructionImpl function performs alias processing and then performs actual
1733
1733
matching.
1734
1734
1735
1735
Alias processing is the phase that canonicalizes different lexical forms of the
@@ -1934,7 +1934,7 @@ following constraints are met:
1934
1934
1935
1935
* Caller and callee have matching return type or the callee result is not used.
1936
1936
1937
- * If any of the callee arguments are being passed in stack, they must be
1937
+ * If any of the callee arguments are being passed on the stack, they must be
1938
1938
available in caller's own incoming argument stack and the frame offsets must
1939
1939
be the same.
1940
1940
@@ -2074,7 +2074,7 @@ character per operand with an optional special size. For example:
2074
2074
The PowerPC backend
2075
2075
-------------------
2076
2076
2077
- The PowerPC code generator lives in the lib/Target/PowerPC directory. The code
2077
+ The PowerPC code generator lives in the `` lib/Target/PowerPC `` directory. The code
2078
2078
generation is retargetable to several variations or *subtargets * of the PowerPC
2079
2079
ISA; including ppc32, ppc64 and altivec.
2080
2080
@@ -2140,7 +2140,7 @@ previous frame pointer (r31.) The entries in the linkage area are the size of a
2140
2140
GPR, thus the linkage area is 24 bytes long in 32-bit mode and 48 bytes in
2141
2141
64-bit mode.
2142
2142
2143
- 32 bit linkage area:
2143
+ 32- bit linkage area:
2144
2144
2145
2145
:raw-html: `<table border =" 1" cellspacing =" 0" >`
2146
2146
:raw-html: `<tr >`
@@ -2169,7 +2169,7 @@ GPR, thus the linkage area is 24 bytes long in 32-bit mode and 48 bytes in
2169
2169
:raw-html: `</tr >`
2170
2170
:raw-html: `</table >`
2171
2171
2172
- 64 bit linkage area:
2172
+ 64- bit linkage area:
2173
2173
2174
2174
:raw-html: `<table border =" 1" cellspacing =" 0" >`
2175
2175
:raw-html: `<tr >`
0 commit comments