diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2005-05-17 02:27:30 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2005-05-17 02:27:30 +0000 |
commit | e62ec45887142a0048f679bf91fefcc81a1e3ed0 (patch) | |
tree | 7de839cfaf02ceebec9742fbc42fa5ee2eb9eeb3 /llvm/docs/WritingAnLLVMBackend.html | |
parent | 3dcba5cd4ab429955e76d080c546e0193d1d751b (diff) | |
download | bcm5719-llvm-e62ec45887142a0048f679bf91fefcc81a1e3ed0.tar.gz bcm5719-llvm-e62ec45887142a0048f679bf91fefcc81a1e3ed0.zip |
Recommend writing new instruction selectors using pattern-based mechanisms
llvm-svn: 22098
Diffstat (limited to 'llvm/docs/WritingAnLLVMBackend.html')
-rw-r--r-- | llvm/docs/WritingAnLLVMBackend.html | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/llvm/docs/WritingAnLLVMBackend.html b/llvm/docs/WritingAnLLVMBackend.html index 3bd23b46040..abf91feb8a8 100644 --- a/llvm/docs/WritingAnLLVMBackend.html +++ b/llvm/docs/WritingAnLLVMBackend.html @@ -109,15 +109,14 @@ described the instruction set with the assembly printer generator in mind, that step can be almost automated.</li> </ul> -<p>Now, for static code generation you also need to write an instruction -selector for your platform: see <tt>lib/Target/*/*ISelSimple.cpp</tt> which -is no longer "simple" but it gives you the idea: you have to be able to create -MachineInstrs for any given LLVM instruction using the <tt>InstVisitor</tt> -pattern, and produce a <tt>MachineFunction</tt> with -<tt>MachineBasicBlock</tt>s full of <tt><a -href="CodeGenerator.html#machineinstr">MachineInstr</a></tt>s for a -corresponding LLVM Function. Creating an instruction selector is perhaps the -most time-consuming part of creating a back-end.</p> +<p>You also need to write an instruction selector for your platform. The +recommended method is the pattern-matching instruction selector. You can see +examples in other targets: <tt>lib/Target/*/*ISelPattern.cpp</tt>. The former +method for writing instruction selectors (<b>not</b> recommended) is +encapsulated in <tt>lib/Target/*/*ISelSimple.cpp</tt>, which are +<tt>InstVisitor</tt>-based translators, generating code for an LLVM instruction +at a time. Creating an instruction selector is perhaps the most time-consuming +part of creating a back-end.</p> <p>To create a JIT for your platform:</p> |