Skip to content

Commit 4447fc6

Browse files
author
John Criswell
committed
Merged Misha Modifications from Mainline.
llvm-svn: 22105
1 parent 4d9d10c commit 4447fc6

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

llvm/docs/WritingAnLLVMBackend.html

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,16 @@
109109
step can be almost automated.</li>
110110
</ul>
111111

112-
<p>Now, for static code generation you also need to write an instruction
113-
selector for your platform: see <tt>lib/Target/*/*ISelSimple.cpp</tt> which
114-
is no longer "simple" but it gives you the idea: you have to be able to create
115-
MachineInstrs for any given LLVM instruction using the <tt>InstVisitor</tt>
116-
pattern, and produce a <tt>MachineFunction</tt> with
117-
<tt>MachineBasicBlock</tt>s full of <tt><a
118-
href="CodeGenerator.html#machineinstr">MachineInstr</a></tt>s for a
119-
corresponding LLVM Function. Creating an instruction selector is perhaps the
120-
most time-consuming part of creating a back-end.</p>
112+
<p>You also need to write an instruction selector for your platform. The
113+
recommended method is the <a
114+
href="CodeGenerator.html#instselect">pattern-matching instruction selector</a>,
115+
examples of which you can see in other targets:
116+
<tt>lib/Target/*/*ISelPattern.cpp</tt>. The former method for writing
117+
instruction selectors (<b>not</b> recommended for new targets) is evident in
118+
<tt>lib/Target/*/*ISelSimple.cpp</tt>, which are <tt>InstVisitor</tt>-based
119+
translators, generating code for an LLVM instruction at a time. Creating an
120+
instruction selector is perhaps the most time-consuming part of creating a
121+
back-end.</p>
121122

122123
<p>To create a JIT for your platform:</p>
123124

@@ -229,10 +230,13 @@
229230
<ul>
230231
<li><a href="CodeGenerator.html">Code generator</a> -
231232
describes some of the classes in code generation at a high level, but
232-
it is not (yet) complete.</li>
233+
it is not (yet) complete</li>
233234
<li><a href="TableGenFundamentals.html">TableGen fundamentals</a> -
234-
describes how to use TableGen to describe your target information succinctly
235-
</li>
235+
describes how to use TableGen to describe your target information
236+
succinctly</li>
237+
<li><a href="HowToSubmitABug.html#codegen">Debugging code generation with
238+
bugpoint</a> - shows bugpoint usage scenarios to simplify backend
239+
development</li>
236240
</ul>
237241

238242
</div>

0 commit comments

Comments
 (0)