mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 05:32:25 +00:00
Fix a few typos, spellos, grammaros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14043 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c0a2af1cf3
commit
bdbcb8a260
@ -68,12 +68,12 @@ The LLVM target-independent code generator consists of five main components:</p>
|
|||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="#targetdesc">Abstract target description</a> interfaces which
|
<li><a href="#targetdesc">Abstract target description</a> interfaces which
|
||||||
capture improtant properties about various aspects of the machine independently
|
capture important properties about various aspects of the machine, independently
|
||||||
of how they will be used. These interfaces are defined in
|
of how they will be used. These interfaces are defined in
|
||||||
<tt>include/llvm/Target/</tt>.</li>
|
<tt>include/llvm/Target/</tt>.</li>
|
||||||
|
|
||||||
<li>Classes used to represent the <a href="#codegendesc">machine code</a> being
|
<li>Classes used to represent the <a href="#codegendesc">machine code</a> being
|
||||||
generator for a target. These classes are intended to be abstract enough to
|
generated for a target. These classes are intended to be abstract enough to
|
||||||
represent the machine code for <i>any</i> target machine. These classes are
|
represent the machine code for <i>any</i> target machine. These classes are
|
||||||
defined in <tt>include/llvm/CodeGen/</tt>.</li>
|
defined in <tt>include/llvm/CodeGen/</tt>.</li>
|
||||||
|
|
||||||
@ -99,8 +99,8 @@ Depending on which part of the code generator you are interested in working on,
|
|||||||
different pieces of this will be useful to you. In any case, you should be
|
different pieces of this will be useful to you. In any case, you should be
|
||||||
familiar with the <a href="#targetdesc">target description</a> and <a
|
familiar with the <a href="#targetdesc">target description</a> and <a
|
||||||
href="#codegendesc">machine code representation</a> classes. If you want to add
|
href="#codegendesc">machine code representation</a> classes. If you want to add
|
||||||
a backend for a new target, you will need <a href="#targetimpls">implement the
|
a backend for a new target, you will need to <a href="#targetimpls">implement the
|
||||||
targe description</a> classes for your new target and understand the <a
|
target description</a> classes for your new target and understand the <a
|
||||||
href="LangRef.html">LLVM code representation</a>. If you are interested in
|
href="LangRef.html">LLVM code representation</a>. If you are interested in
|
||||||
implementing a new <a href="#codegenalgs">code generation algorithm</a>, it
|
implementing a new <a href="#codegenalgs">code generation algorithm</a>, it
|
||||||
should only depend on the target-description and machine code representation
|
should only depend on the target-description and machine code representation
|
||||||
@ -133,7 +133,7 @@ implements these two interfaces, and does its own thing. Another example of a
|
|||||||
code generator like this is a (purely hypothetical) backend that converts LLVM
|
code generator like this is a (purely hypothetical) backend that converts LLVM
|
||||||
to the GCC RTL form and uses GCC to emit machine code for a target.</p>
|
to the GCC RTL form and uses GCC to emit machine code for a target.</p>
|
||||||
|
|
||||||
<p>The other implication of this design is that it is possible to design and
|
<p>This design also implies that it is possible to design and
|
||||||
implement radically different code generators in the LLVM system that do not
|
implement radically different code generators in the LLVM system that do not
|
||||||
make use of any of the built-in components. Doing so is not recommended at all,
|
make use of any of the built-in components. Doing so is not recommended at all,
|
||||||
but could be required for radically different targets that do not fit into the
|
but could be required for radically different targets that do not fit into the
|
||||||
@ -164,9 +164,9 @@ quality code generation for standard register-based microprocessors. Code
|
|||||||
generation in this model is divided into the following stages:</p>
|
generation in this model is divided into the following stages:</p>
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li><b>Instruction Selection</b> - Determining a efficient implementation of the
|
<li><b>Instruction Selection</b> - Determining an efficient implementation of the
|
||||||
input LLVM code in the target instruction set. This stage produces the initial
|
input LLVM code in the target instruction set. This stage produces the initial
|
||||||
code for the program in the target instruction set the makes use of virtual
|
code for the program in the target instruction set, then makes use of virtual
|
||||||
registers in SSA form and physical registers that represent any required
|
registers in SSA form and physical registers that represent any required
|
||||||
register assignments due to target constraints or calling conventions.</li>
|
register assignments due to target constraints or calling conventions.</li>
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ elimination and stack packing.</li>
|
|||||||
"final" machine code can go here, such as spill code scheduling and peephole
|
"final" machine code can go here, such as spill code scheduling and peephole
|
||||||
optimizations.</li>
|
optimizations.</li>
|
||||||
|
|
||||||
<li><b>Code Emission</b> - The final stage actually outputs the machine code for
|
<li><b>Code Emission</b> - The final stage actually outputs the code for
|
||||||
the current function, either in the target assembler format or in machine
|
the current function, either in the target assembler format or in machine
|
||||||
code.</li>
|
code.</li>
|
||||||
|
|
||||||
@ -200,11 +200,13 @@ code.</li>
|
|||||||
<p>
|
<p>
|
||||||
The code generator is based on the assumption that the instruction selector will
|
The code generator is based on the assumption that the instruction selector will
|
||||||
use an optimal pattern matching selector to create high-quality sequences of
|
use an optimal pattern matching selector to create high-quality sequences of
|
||||||
native code. Alternative code generator designs based on pattern expansion and
|
native instructions. Alternative code generator designs based on pattern
|
||||||
aggressive iterative peephole optimization are much slower. This design is
|
expansion and
|
||||||
designed to permit efficient compilation (important for JIT environments) and
|
aggressive iterative peephole optimization are much slower. This design
|
||||||
aggressive optimization (used when generate code offline) by allowing components
|
permits efficient compilation (important for JIT environments) and
|
||||||
of varying levels of sophisication to be used for any step of compilation.</p>
|
aggressive optimization (used when generating code offline) by allowing
|
||||||
|
components of varying levels of sophisication to be used for any step of
|
||||||
|
compilation.</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
In addition to these stages, target implementations can insert arbitrary
|
In addition to these stages, target implementations can insert arbitrary
|
||||||
@ -253,7 +255,7 @@ as inputs or other algorithm-specific data structures).</p>
|
|||||||
<p>All of the target description classes (except the <tt><a
|
<p>All of the target description classes (except the <tt><a
|
||||||
href="#targetdata">TargetData</a></tt> class) are designed to be subclassed by
|
href="#targetdata">TargetData</a></tt> class) are designed to be subclassed by
|
||||||
the concrete target implementation, and have virtual methods implemented. To
|
the concrete target implementation, and have virtual methods implemented. To
|
||||||
get to these implementations, <tt><a
|
get to these implementations, the <tt><a
|
||||||
href="#targetmachine">TargetMachine</a></tt> class provides accessors that
|
href="#targetmachine">TargetMachine</a></tt> class provides accessors that
|
||||||
should be implemented by the target.</p>
|
should be implemented by the target.</p>
|
||||||
|
|
||||||
@ -269,7 +271,7 @@ should be implemented by the target.</p>
|
|||||||
<p>The <tt>TargetMachine</tt> class provides virtual methods that are used to
|
<p>The <tt>TargetMachine</tt> class provides virtual methods that are used to
|
||||||
access the target-specific implementations of the various target description
|
access the target-specific implementations of the various target description
|
||||||
classes (with the <tt>getInstrInfo</tt>, <tt>getRegisterInfo</tt>,
|
classes (with the <tt>getInstrInfo</tt>, <tt>getRegisterInfo</tt>,
|
||||||
<tt>getFrameInfo</tt>, ... methods). This class is designed to be subclassed by
|
<tt>getFrameInfo</tt>, ... methods). This class is designed to be specialized by
|
||||||
a concrete target implementation (e.g., <tt>X86TargetMachine</tt>) which
|
a concrete target implementation (e.g., <tt>X86TargetMachine</tt>) which
|
||||||
implements the various virtual methods. The only required target description
|
implements the various virtual methods. The only required target description
|
||||||
class is the <a href="#targetdata"><tt>TargetData</tt></a> class, but if the
|
class is the <a href="#targetdata"><tt>TargetData</tt></a> class, but if the
|
||||||
|
Loading…
Reference in New Issue
Block a user