Recommend writing new instruction selectors using pattern-based mechanisms

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22098 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Misha Brukman 2005-05-17 02:27:30 +00:00
parent a3bfc6f253
commit 4937c9db28

View File

@ -109,15 +109,14 @@ described the instruction set with the assembly printer generator in mind, that
step can be almost automated.</li> step can be almost automated.</li>
</ul> </ul>
<p>Now, for static code generation you also need to write an instruction <p>You also need to write an instruction selector for your platform. The
selector for your platform: see <tt>lib/Target/*/*ISelSimple.cpp</tt> which recommended method is the pattern-matching instruction selector. You can see
is no longer "simple" but it gives you the idea: you have to be able to create examples in other targets: <tt>lib/Target/*/*ISelPattern.cpp</tt>. The former
MachineInstrs for any given LLVM instruction using the <tt>InstVisitor</tt> method for writing instruction selectors (<b>not</b> recommended) is
pattern, and produce a <tt>MachineFunction</tt> with encapsulated in <tt>lib/Target/*/*ISelSimple.cpp</tt>, which are
<tt>MachineBasicBlock</tt>s full of <tt><a <tt>InstVisitor</tt>-based translators, generating code for an LLVM instruction
href="CodeGenerator.html#machineinstr">MachineInstr</a></tt>s for a at a time. Creating an instruction selector is perhaps the most time-consuming
corresponding LLVM Function. Creating an instruction selector is perhaps the part of creating a back-end.</p>
most time-consuming part of creating a back-end.</p>
<p>To create a JIT for your platform:</p> <p>To create a JIT for your platform:</p>